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.
If you want to deploy a private repo, you have to make it public first.
Private repository data is scanned by machine and never read by GitHub staff. Human eyes will never see the contents of your private repositories, except as described in our Terms of Service. Your individual personal or repository data will not be shared with third parties.
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...
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With