Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

install_github: API rate limit exceeded #210

Closed
trinker opened this issue Oct 16, 2018 · 18 comments
Closed

install_github: API rate limit exceeded #210

trinker opened this issue Oct 16, 2018 · 18 comments

Comments

@trinker
Copy link

@trinker trinker commented Oct 16, 2018

For version 2.0.0 remotes::install_github I am running into the following error versus the devtools::install_github which has no such error.

remotes installing github package

> remotes::install_github('trinker/clustext')
Downloading GitHub repo trinker/clustext@master
Error: HTTP error 403.
  API rate limit exceeded for 151.181.86.126. (But here's the good news: Authenticated requests get a higher rate limit. Check out the documentation for more details.)

  Rate limit remaining: 0
  Rate limit reset at: 2018-10-16 15:23:35 UTC

devtools installing github package: no problems

> devtools::install_github('trinker/clustext')
Downloading GitHub repo trinker/clustext@master
from URL https://api.github.com/repos/trinker/clustext/zipball/master
Installing clustext
Installing 1 package: dynamicTreeCut
trying URL 'https://cran.rstudio.com/bin/windows/contrib/3.5/dynamicTreeCut_1.63-1.zip'
Content type 'application/zip' length 91925 bytes (89 KB)
downloaded 89 KB

package ‘dynamicTreeCut’ succ....[truncated but everything enstalled correctly].............
```
@jimhester
Copy link
Member

@jimhester jimhester commented Oct 16, 2018

The results of traceback() after the error would be useful, also are you hitting the rate limit locally or on travis / elsewhere?

@trinker
Copy link
Author

@trinker trinker commented Oct 17, 2018

Rate limit is local.

I can't replicate this issue after installing from devtools AND hours later. It was only for this package but I had just installed 8 more github packages. The error seems to be related to the API call which I assume devtools is not using but remotes is. I would assume then that this issue isn't reproducible in that you'd have to hit you're limit in that session but I'd say installing 8 github packages in one fell swoop isn't uncommon, especially after a new R build.

@jimhester
Copy link
Member

@jimhester jimhester commented Oct 17, 2018

So the information we are using the GitHub API for in remotes is to retrieve the package names and the SHA of the current version.

The current CRAN version of devtools uses a raw.githubusercontent.com link for the name and a call to git2r::remote_ls() for the SHA, both of which do not use the GitHub API.

remotes uses the API to retrieve both pieces of information.

The benefits to using the API is that it works seamlessly for GitHub enterprise as well as private repositories. Neither raw.githubusercontent.com or remote_ls() will work in those scenarios.

GitHub has a rate limit of 60 requests per hour for unauthenticated requests, but 5000 an hour for authenticated requests. So the easiest solution is to create a GitHub PAT, with usethis::browse_github_pat() and add it to your .Renviron file with usethis::edit_r_environ().

@trinker
Copy link
Author

@trinker trinker commented Oct 22, 2018

@jimhester I have a test in pacman that attempts to install packages from github. In doing so I wound up with a rate limit error on CRAN. I got no such erros on Winbuilder dev or release and not locally either. Later I was told it was a false positive but I see it still has the same error on Debian. Again, for the CRAN error I share below I was later told this was a false positive and pacman was on its way to CRAN. That being said I worry that it will come back if the rate limit is close.

  1. Is this something I should be concerned about?
  2. How to make sure CRAN doesn't error when testing remotes based functions?

Also releated...travis ci seems to error now for any repo when the rate limit is hit. I think it's how I have the travis.yml script configured: https://travis-ci.org/trinker/textclean This also seems to be an error with devtools::install_github() not remotes. Just raising this here. Let me know if I should open another issue at devtools, or if there's a fix in the works, and/or if it's how I have travis.yml file set up: https://github.com/trinker/textclean/blob/master/.travis.yml

Error that CRAN emailed

* using log directory ‘/srv/hornik/tmp/CRAN/pacman.Rcheck’
* using R Under development (unstable) (2018-10-20 r75474)
* using platform: x86_64-pc-linux-gnu (64-bit)
* using session charset: UTF-8
* checking for file ‘pacman/DESCRIPTION’ ... OK
* checking extension type ... Package
* this is package ‘pacman’ version ‘0.5.0’
* checking CRAN incoming feasibility ... Note_to_CRAN_maintainers
Maintainer: ‘Tyler Rinker <tyler.rinker@gmail.com>’
* checking package namespace information ... OK
* checking package dependencies ... OK
* checking if this is a source package ... OK
* checking if there is a namespace ... OK
* checking for executable files ... OK
* checking for hidden files and directories ... OK
* checking for portable file names ... OK
* checking for sufficient/correct file permissions ... OK
* checking whether package ‘pacman’ can be installed ... [2s/2s] OK
* checking package directory ... OK
* checking for future file timestanps ... OK
* checking ‘build’ directory ... OK
* checking DESCRIPTION meta-information ... OK
* checking top-level files ... OK
* checking for left-over files ... OK
* checking index information ... OK
* checking package subdirectories ... OK
* checking R files for non-ASCII characters ... OK
* checking R files for syntax errors ... OK
* checking whether the package can be loaded ... OK
* checking whether the package can be loaded with stated dependencies ... OK
* checking whether the package can be unloaded cleanly ... OK
* checking whether the namespace can be loaded with stated dependencies ... OK
* checking whether the namespace can be unloaded cleanly ... OK
* checking loading without being on the library search path ... OK
* checking use of S3 registration ... OK
* checking dependencies in R code ... OK
* checking S3 generic/method consistency ... OK
* checking replacement functions ... OK
* checking foreign function calls ... OK
* checking R code for possible problems ... [6s/6s] OK
* checking Rd files ... OK
* checking Rd metadata ... OK
* checking Rd line widths ... OK
* checking Rd cross-references ... OK
* checking for missing documentation entries ... OK
* checking for code/documentation mismatches ... OK
* checking Rd \usage sections ... OK
* checking Rd contents ... OK
* checking for unstated dependencies in examples ... OK
* checking installed files from ‘inst/doc’ ... OK
* checking files in ‘vignettes’ ... OK
* checking examples ... [4s/4s] OK
* checking for unstated dependencies in ‘tests’ ... OK
* checking tests ... [6s/16s] OK
  Running ‘testthat.R’ [5s/15s]
* checking for unstated dependencies in vignettes ... OK
* checking package vignettes in ‘inst/doc’ ... OK
* checking re-building of vignette outputs ... [4s/5s] OK
* checking PDF version of manual ... OK
* DONE
Status: OK

Current CRAN status: ERROR: 7, OK: 5
See: <https://CRAN.R-project.org/web/checks/check_results_pacman.html>

Version: 0.4.6
Check: tests, Result: ERROR
    Running ‘testthat.R’ [5s/6s]
  Running the tests in ‘tests/testthat.R’ failed.
  Complete output:
    > library("testthat")
    > library("pacman")
    > options(repos="http://cran.rstudio.com/")
    > 
    > 
    > test_check("pacman")
    ── 1. Error: p_install_gh works (@test-p_install_gh.R#5)  ──────────────────────
    HTTP error 404.
      Not Found
    
      Rate limit remaining: 59/60
      Rate limit reset at: 2018-10-21 21:38:35 UTC
    
      
    1: expect_false(p_install_gh("greg/iDontExistAnywhere")) at testthat/test-p_install_gh.R:5
    2: quasi_label(enquo(object), label)
    3: eval_bare(get_expr(quo), get_env(quo))
    4: p_install_gh("greg/iDontExistAnywhere")
    5: lapply(package, function(x) {
           devtools::install_github(x, dependencies = dependencies, ...)
       })
    6: FUN(X[[i]], ...)
    7: devtools::install_github(x, dependencies = dependencies, ...)
    8: install_remotes(remotes, auth_token = auth_token, host = host, dependencies = dependencies, 
           upgrade = upgrade, force = force, quiet = quiet, build = build, build_opts = build_opts, 
           repos = repos, type = type, ...)
    9: vapply(remotes, install_remote, ..., FUN.VALUE = character(1))
    10: FUN(X[[i]], ...)
    11: remote_package_name(remote)
    12: remote_package_name.github_remote(remote)
    13: github_DESCRIPTION(username = remote$username, repo = remote$repo, subdir = remote$subdir, 
           host = remote$host, ref = remote$ref, pat = remote$auth_token %||% github_pat(), 
           use_curl = use_curl)
    
    ══ testthat results  ═══════════════════════════════════════════════════════════
    OK: 54 SKIPPED: 3 FAILED: 1
    1. Error: p_install_gh works (@test-p_install_gh.R#5) 
    
    Error: testthat unit tests failed
    Execution halted
See: <https://www.r-project.org/nosvn/R.check/r-devel-linux-x86_64-debian-clang/pacman-00check.html>

Version: 0.4.6
Check: tests, Result: ERROR
    Running ‘testthat.R’ [4s/6s]
  Running the tests in ‘tests/testthat.R’ failed.
  Complete output:
    > library("testthat")
    > library("pacman")
    > options(repos="http://cran.rstudio.com/")
    > 
    > 
    > test_check("pacman")
    ── 1. Error: p_install_gh works (@test-p_install_gh.R#5)  ──────────────────────
    HTTP error 404.
      Not Found
    
      Rate limit remaining: 59/60
      Rate limit reset at: 2018-10-21 19:45:55 UTC
    
      
    1: expect_false(p_install_gh("greg/iDontExistAnywhere")) at testthat/test-p_install_gh.R:5
    2: quasi_label(enquo(object), label)
    3: eval_bare(get_expr(quo), get_env(quo))
    4: p_install_gh("greg/iDontExistAnywhere")
    5: lapply(package, function(x) {
           devtools::install_github(x, dependencies = dependencies, ...)
       })
    6: FUN(X[[i]], ...)
    7: devtools::install_github(x, dependencies = dependencies, ...)
    8: install_remotes(remotes, auth_token = auth_token, host = host, dependencies = dependencies, 
           upgrade = upgrade, force = force, quiet = quiet, build = build, build_opts = build_opts, 
           repos = repos, type = type, ...)
    9: vapply(remotes, install_remote, ..., FUN.VALUE = character(1))
    10: FUN(X[[i]], ...)
    11: remote_package_name(remote)
    12: remote_package_name.github_remote(remote)
    13: github_DESCRIPTION(username = remote$username, repo = remote$repo, subdir = remote$subdir, 
           host = remote$host, ref = remote$ref, pat = remote$auth_token %||% github_pat(), 
           use_curl = use_curl)
    
    ══ testthat results  ═══════════════════════════════════════════════════════════
    OK: 54 SKIPPED: 3 FAILED: 1
    1. Error: p_install_gh works (@test-p_install_gh.R#5) 
    
    Error: testthat unit tests failed
    Execution halted
See: <https://www.r-project.org/nosvn/R.check/r-devel-linux-x86_64-debian-gcc/pacman-00check.html>

Version: 0.4.6
Check: tests, Result: ERROR
    Running ‘testthat.R’
  Running the tests in ‘tests/testthat.R’ failed.
  Complete output:
    > library("testthat")
    > library("pacman")
    > options(repos="http://cran.rstudio.com/")
    > 
    > 
    > test_check("pacman")
    ── 1. Error: p_install_gh works (@test-p_install_gh.R#5)  ──────────────────────
    HTTP error 404.
      Not Found
    
      Rate limit remaining: 31
      Rate limit reset at: 2018-10-19 14:13:18 UTC
    1: expect_false(p_install_gh("greg/iDontExistAnywhere")) at testthat/test-p_install_gh.R:5
    2: quasi_label(enquo(object), label)
    3: eval_bare(get_expr(quo), get_env(quo))
    4: p_install_gh("greg/iDontExistAnywhere")
    5: lapply(package, function(x) {
           devtools::install_github(x, dependencies = dependencies, ...)
       })
    6: FUN(X[[i]], ...)
    7: devtools::install_github(x, dependencies = dependencies, ...)
    8: install_remotes(remotes, auth_token = auth_token, host = host, dependencies = dependencies, 
           upgrade = upgrade, force = force, quiet = quiet, build = build, build_opts = build_opts, 
           repos = repos, type = type, ...)
    9: vapply(remotes, install_remote, ..., FUN.VALUE = character(1))
    10: FUN(X[[i]], ...)
    11: remote_package_name(remote)
    12: remote_package_name.github_remote(remote)
    13: github_DESCRIPTION(username = remote$username, repo = remote$repo, subdir = remote$subdir, 
           host = remote$host, ref = remote$ref, pat = remote$auth_token %||% github_pat(), 
           use_curl = use_curl)
    
    ══ testthat results  ═══════════════════════════════════════════════════════════
    OK: 54 SKIPPED: 3 FAILED: 1
    1. Error: p_install_gh works (@test-p_install_gh.R#5) 
    
    Error: testthat unit tests failed
    Execution halted
See: <https://www.r-project.org/nosvn/R.check/r-devel-linux-x86_64-fedora-clang/pacman-00check.html>

Version: 0.4.6
Check: tests, Result: ERROR
    Running ‘testthat.R’
  Running the tests in ‘tests/testthat.R’ failed.
  Complete output:
    > library("testthat")
    > library("pacman")
    > options(repos="http://cran.rstudio.com/")
    > 
    > 
    > test_check("pacman")
    ── 1. Error: p_install_gh works (@test-p_install_gh.R#5)  ──────────────────────
    HTTP error 404.
      Not Found
    
      Rate limit remaining: 32
      Rate limit reset at: 2018-10-19 14:13:18 UTC
    1: expect_false(p_install_gh("greg/iDontExistAnywhere")) at testthat/test-p_install_gh.R:5
    2: quasi_label(enquo(object), label)
    3: eval_bare(get_expr(quo), get_env(quo))
    4: p_install_gh("greg/iDontExistAnywhere")
    5: lapply(package, function(x) {
           devtools::install_github(x, dependencies = dependencies, ...)
       })
    6: FUN(X[[i]], ...)
    7: devtools::install_github(x, dependencies = dependencies, ...)
    8: install_remotes(remotes, auth_token = auth_token, host = host, dependencies = dependencies, 
           upgrade = upgrade, force = force, quiet = quiet, build = build, build_opts = build_opts, 
           repos = repos, type = type, ...)
    9: vapply(remotes, install_remote, ..., FUN.VALUE = character(1))
    10: FUN(X[[i]], ...)
    11: remote_package_name(remote)
    12: remote_package_name.github_remote(remote)
    13: github_DESCRIPTION(username = remote$username, repo = remote$repo, subdir = remote$subdir, 
           host = remote$host, ref = remote$ref, pat = remote$auth_token %||% github_pat(), 
           use_curl = use_curl)
    
    ══ testthat results  ═══════════════════════════════════════════════════════════
    OK: 54 SKIPPED: 3 FAILED: 1
    1. Error: p_install_gh works (@test-p_install_gh.R#5) 
    
    Error: testthat unit tests failed
    Execution halted
See: <https://www.r-project.org/nosvn/R.check/r-devel-linux-x86_64-fedora-gcc/pacman-00check.html>

Version: 0.4.6
Check: tests, Result: ERROR
    Running ‘testthat.R’ [5s/7s]
  Running the tests in ‘tests/testthat.R’ failed.
  Complete output:
    > library("testthat")
    > library("pacman")
    > options(repos="http://cran.rstudio.com/")
    > 
    > 
    > test_check("pacman")
    ── 1. Error: p_install_gh works (@test-p_install_gh.R#5)  ──────────────────────
    HTTP error 404.
      Not Found
    
      Rate limit remaining: 59
      Rate limit reset at: 2018-10-19 21:07:30 UTC
    1: expect_false(p_install_gh("greg/iDontExistAnywhere")) at testthat/test-p_install_gh.R:5
    2: quasi_label(enquo(object), label)
    3: eval_bare(get_expr(quo), get_env(quo))
    4: p_install_gh("greg/iDontExistAnywhere")
    5: lapply(package, function(x) {
           devtools::install_github(x, dependencies = dependencies, ...)
       })
    6: FUN(X[[i]], ...)
    7: devtools::install_github(x, dependencies = dependencies, ...)
    8: install_remotes(remotes, auth_token = auth_token, host = host, dependencies = dependencies, 
           upgrade = upgrade, force = force, quiet = quiet, build = build, build_opts = build_opts, 
           repos = repos, type = type, ...)
    9: vapply(remotes, install_remote, ..., FUN.VALUE = character(1))
    10: FUN(X[[i]], ...)
    11: remote_package_name(remote)
    12: remote_package_name.github_remote(remote)
    13: github_DESCRIPTION(username = remote$username, repo = remote$repo, subdir = remote$subdir, 
           host = remote$host, ref = remote$ref, pat = remote$auth_token %||% github_pat(), 
           use_curl = use_curl)
    
    ══ testthat results  ═══════════════════════════════════════════════════════════
    OK: 54 SKIPPED: 3 FAILED: 1
    1. Error: p_install_gh works (@test-p_install_gh.R#5) 
    
    Error: testthat unit tests failed
    Execution halted
See: <https://www.r-project.org/nosvn/R.check/r-patched-linux-x86_64/pacman-00check.html>

Version: 0.4.6
Check: tests, Result: ERROR
    Running ‘testthat.R’ [8s/21s]
  Running the tests in ‘tests/testthat.R’ failed.
  Complete output:
    > library("testthat")
    > library("pacman")
    > options(repos="http://cran.rstudio.com/")
    > 
    > 
    > test_check("pacman")
    ── 1. Error: p_install_gh works (@test-p_install_gh.R#5)  ──────────────────────
    HTTP error 404.
      Not Found
    
      Rate limit remaining: 54
      Rate limit reset at: 2018-10-19 14:27:14 UTC
    1: expect_false(p_install_gh("greg/iDontExistAnywhere")) at testthat/test-p_install_gh.R:5
    2: quasi_label(enquo(object), label)
    3: eval_bare(get_expr(quo), get_env(quo))
    4: p_install_gh("greg/iDontExistAnywhere")
    5: lapply(package, function(x) {
           devtools::install_github(x, dependencies = dependencies, ...)
       })
    6: FUN(X[[i]], ...)
    7: devtools::install_github(x, dependencies = dependencies, ...)
    8: install_remotes(remotes, auth_token = auth_token, host = host, dependencies = dependencies, 
           upgrade = upgrade, force = force, quiet = quiet, build = build, build_opts = build_opts, 
           repos = repos, type = type, ...)
    9: vapply(remotes, install_remote, ..., FUN.VALUE = character(1))
    10: FUN(X[[i]], ...)
    11: remote_package_name(remote)
    12: remote_package_name.github_remote(remote)
    13: github_DESCRIPTION(username = remote$username, repo = remote$repo, subdir = remote$subdir, 
           host = remote$host, ref = remote$ref, pat = remote$auth_token %||% github_pat(), 
           use_curl = use_curl)
    
    ══ testthat results  ═══════════════════════════════════════════════════════════
    OK: 54 SKIPPED: 3 FAILED: 1
    1. Error: p_install_gh works (@test-p_install_gh.R#5) 
    
    Error: testthat unit tests failed
    Execution halted
See: <https://www.r-project.org/nosvn/R.check/r-patched-solaris-x86/pacman-00check.html>

Version: 0.4.6
Check: tests, Result: ERROR
    Running ‘testthat.R’ [5s/7s]
  Running the tests in ‘tests/testthat.R’ failed.
  Complete output:
    > library("testthat")
    > library("pacman")
    > options(repos="http://cran.rstudio.com/")
    > 
    > 
    > test_check("pacman")
    ── 1. Error: p_install_gh works (@test-p_install_gh.R#5)  ──────────────────────
    HTTP error 404.
      Not Found
    
      Rate limit remaining: 55/60
      Rate limit reset at: 2018-10-20 07:25:39 UTC
    
      
    1: expect_false(p_install_gh("greg/iDontExistAnywhere")) at testthat/test-p_install_gh.R:5
    2: quasi_label(enquo(object), label)
    3: eval_bare(get_expr(quo), get_env(quo))
    4: p_install_gh("greg/iDontExistAnywhere")
    5: lapply(package, function(x) {
           devtools::install_github(x, dependencies = dependencies, ...)
       })
    6: FUN(X[[i]], ...)
    7: devtools::install_github(x, dependencies = dependencies, ...)
    8: install_remotes(remotes, auth_token = auth_token, host = host, dependencies = dependencies, 
           upgrade = upgrade, force = force, quiet = quiet, build = build, build_opts = build_opts, 
           repos = repos, type = type, ...)
    9: vapply(remotes, install_remote, ..., FUN.VALUE = character(1))
    10: FUN(X[[i]], ...)
    11: remote_package_name(remote)
    12: remote_package_name.github_remote(remote)
    13: github_DESCRIPTION(username = remote$username, repo = remote$repo, subdir = remote$subdir, 
           host = remote$host, ref = remote$ref, pat = remote$auth_token %||% github_pat(), 
           use_curl = use_curl)
    
    ══ testthat results  ═══════════════════════════════════════════════════════════
    OK: 54 SKIPPED: 3 FAILED: 1
    1. Error: p_install_gh works (@test-p_install_gh.R#5) 
    
    Error: testthat unit tests failed
    Execution halted
See: <https://www.r-project.org/nosvn/R.check/r-release-linux-x86_64/pacman-00check.html>

@gaborcsardi
Copy link
Contributor

@gaborcsardi gaborcsardi commented Oct 22, 2018

@trinker GitHub has been half-dead all day: https://status.github.com/messages

@trinker
Copy link
Author

@trinker trinker commented Oct 22, 2018

@gaborcsardi Ah makes sense

nevrome added a commit to Johanna-Mestorf-Academy/sdsbrowser that referenced this issue Oct 23, 2018
@nevrome
Copy link

@nevrome nevrome commented Oct 23, 2018

@trinker I also experienced the rate limit error on travis and was able to avoid it with a small modification of the Remotes field in the package DESCRIPTION. This works, because all my remote dependencies are public repositories.

Maybe this is helpful for you or anybody else who stumbles upon this thread.

@gaborcsardi
Copy link
Contributor

@gaborcsardi gaborcsardi commented Oct 23, 2018

@nevrome remotes has a GitHub token now, so if you update it, all should be good. This said, if you have Remotes, it is good practice to add your own token to the repository.

@nevrome
Copy link

@nevrome nevrome commented Oct 23, 2018

@gaborcsardi Nice - thanks for the fast fix!

But: Is it really good practice to add another token if it's not necessary? Isn't every token a theoretical security vulnerability?

@gaborcsardi
Copy link
Contributor

@gaborcsardi gaborcsardi commented Oct 23, 2018

But: Is it really good practice to add another token if it's not necessary? Isn't every token a theoretical security vulnerability?

I mean, add it as a secret Travis environment variable, not to the files of the repository. The token should only have read-only access. So if you have public repos only, it'll only have access to public data. If you have private repos, then yeah, it needs read-only access to those. Also, you can use the same token for all you repos, no need to create a new one every time.

@jimhester
Copy link
Member

@jimhester jimhester commented Oct 23, 2018

The token doesn't even need read-only access, it actually needs no permissions at all.

@trinker
Copy link
Author

@trinker trinker commented Oct 23, 2018

Jim described one approach above using Renvir but I think that was for local use not travis integration on GitHub. For that I took a slightly different process and wanted to document for others. For adding your own encrypted token variables I did this and it works. The steps were:

  1. Get a token via usethis::browse_github_pat()
  2. Follow the prescribed steps for adding encrypted variables to travis: https://docs.travis-ci.com/user/environment-variables#defining-encrypted-variables-in-travisyml
  3. I did not use the --add env.matrix flag and instead opted to add the variable to travis.yml manaully. I looked at the remotes package to see how this should look: https://github.com/r-lib/remotes/blob/master/.travis.yml

Command line to encrypt token (this is a fake token I'm sharing of course)

travis encrypt GITHUB_PAT = 'fn2435c545nc475mxc4c45hf4xfg7845hcen7cm3'

What the envir var looks like in the remotes package

env:
  global:
  - NOT_CRAN=true
  - secure: "AkQ6xzik9zlMPWo6Y/XH0IJF/0EHQSYKADAFmnawpp9MNUj+chaASM+ZtcY80MgMw3yeyiEvC8RnUTvL0QMXk++MclQuwRycu8WB5dMoIuVKqFfaSVrXX50vRG4/fesohvTCX1UlzhF45Kb6OgWzgzJ5yjVnO85PI/nxdp+nxDoLhofZNj4srdbYTXtO2tBoR9Y48vsj3HAAqtxqAbEefQTw+Tt5bQYJbyxOFaHPyFzRVpJeAhEISAWqRxGnuPouoRTOGzeR72EWx6v8dCF08V5vUKeztZc+LeR9p93SVZPqNLhjvXWFWfPnRrCGR6cID41vr2hq1z4jwKfXxMrPiQ2I0mpH2W+FSICjraNgcm6zXBvbqCxCM4sUuHtwEQ3ARdngyAYkFm1I8IGTv3lkm97DEJbSfXeIis8NOnkMbmcNiNWXFny/hhWBhb2W5+zQYo1flXLj5Tpac1fEFrMKoRQfGB5sh3rlpvD5UJp/Kab1m4pVCJaM0oEzIMsV1h32wLhABGDhq4YzPl0h1h6OwdRAESVQWV+CprXxmuDOZhPo8ppe0aLlQCT4THf4+tnuUkEvVjzuJTCKGm9S8ezGG2+LCkVFYoVwJ9HBdAw0Y413j214Sn6cFha28RjonGKO2CVNhacIe7O76rohWO74hIqjhDcjLLUsaFy0y0+iM9I="

@jimhester
Copy link
Member

@jimhester jimhester commented Oct 23, 2018

@trinker You can absolutely use this method to add the encrypted variable to your .travis.yml, but I generally find it simpler to add it with the settings dialog rather than in the yaml file. e.g. at https://travis-ci.org/username/pkgname/settings for the repository in question.

@Paxanator
Copy link

@Paxanator Paxanator commented Nov 8, 2018

Would the developers be open to being able to set and environment variable changing the default remote for packages missing a Remote: in the DESCRIPTION file? Something along the lines of

REMOTES_DEFAULT_REPOSITORY='cran'

I would be happy to contribute it if so

@gaborcsardi
Copy link
Contributor

@gaborcsardi gaborcsardi commented Nov 8, 2018

@Paxanator I am not sure what you mean, you can already set up the default the standard way, using options("repos"). Also, this is a closed issue. Please open a new one if you have problems. Thanks!

@Paxanator
Copy link

@Paxanator Paxanator commented Nov 8, 2018

Will do!

@schuemie
Copy link

@schuemie schuemie commented Dec 19, 2018

Just documenting for those like me who like a simple solution spelled out:

  1. Go to https://github.com/settings/tokens and create a token. Call it 'travis' or something so you'll know what it was for later. You can leave all check boxes unchecked, no additional access rights are needed.

  2. In Travis, for your repo, go to settings. Add a new environmental variable called GITHUB_PAT, with the new token (the weird string of characters) as value.

@qrzhang
Copy link

@qrzhang qrzhang commented Oct 5, 2021

Got the same issue and solved by following this link https://gist.github.com/z3tt/3dab3535007acf108391649766409421

Need to set up GitHub account to avoid this rate limit error.

  1. Run in R, usethis::create_github_token()
  2. On pop-up website, generate and copy your own taken
  3. Run in R, credentials::set_github_pat("YourPATinStep2")
  4. Verify setting in R, usethis::git_sitrep()
  5. Run in R, remotes::install_github('the repo you want to install')

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

7 participants