R package with private github dependency

我怕爱的太早我们不能终老 提交于 2021-01-27 04:13:08

问题


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

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!