具有私有github依赖关系的R包 [英] R package with private github dependency
问题描述
我正在开发一个内部R软件包,它将从github存储和安装,但是它依赖于另一个R软件包,该R软件包也位于私有仓库中.
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.
推荐答案
只需将@jeroen的回复放入答案格式:
Just putting @jeroen's response in answer format:
将PAT存储在环境变量Sys.setenv(GITHUB_PAT = PAT)中然后devtools/remotes将自动在任何地方使用它.
Store the PAT in an environment variable Sys.setenv(GITHUB_PAT = PAT) then devtools/remotes will automatically use it everywhere.
当私有存储库都使用相同的PAT时,此功能有效.我想知道我们如何对具有不同PAT的遥控器进行此操作...
This works when the private repos all use the same PAT. I wonder how we'd do this for remotes with different PATs...
这篇关于具有私有github依赖关系的R包的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!