我正在尝试从我的 github 存储库安装示例包:
https://github.com/jpmarindiaz/samplepkg
当存储库公开时,我可以通过 R 解释器使用以下任何命令来安装它:
install_github("jpmarindiaz/rdali")
install_github("rdali",user="jpmarindiaz")
install_github("jpmarindiaz/rdali",auth_user="jpmarindiaz")
但是当 git 存储库是私有(private)的时,我收到错误:
Installing github repo samplepkg/master from jpmarindiaz
Downloading samplepkg.zip from
https://github.com/jpmarindiaz/samplepkg/archive/master.zip
Error: client error: (406) Not Acceptable
我还没有弄清楚当存储库是私有(private)的时身份验证如何工作,有什么提示吗?
最佳答案
您是否尝试过设置个人访问 token (PAT) 并将其作为 install_github()
的 auth_token
参数的值传递?
请参阅底部的?install_github
(软件包devtools
版本1.5.0.99)。
关于r - 如何使用 devtools install_github 从私有(private)仓库安装 R 包?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/21171142/