问题
I'm developing an internal R package which is going to be stored and installed from github, but it depends on another R package which is also in a private repo.
I know how to specify remote dependencies with the devtools Remotes:
tag (vignette) and I know how to install private repositories using install_github(source, PAT)
. But how do I do both? The idea is to have a server just install the package, and also install all of the dependencies on github.
回答1:
Just putting @jeroen's response in answer format:
Store the PAT in an environment variable Sys.setenv(GITHUB_PAT = PAT) then devtools/remotes will automatically use it everywhere.
This works when the private repos all use the same PAT. I wonder how we'd do this for remotes with different PATs...
来源:https://stackoverflow.com/questions/39618746/r-package-with-private-github-dependency