简体   繁体   中英

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.

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

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM