Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

R package with private github dependency

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.

like image 417
Shorpy Avatar asked Sep 21 '16 13:09

Shorpy


People also ask

Can you deploy a private GitHub repo?

If you want to deploy a private repo, you have to make it public first.

Can GitHub read private repos?

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.


1 Answers

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...

like image 105
Daniel Egan Avatar answered Sep 17 '22 17:09

Daniel Egan