【发布时间】:2014-02-05 21:53:52
【问题描述】:
我正在尝试从我的 github 存储库安装示例包:
https://github.com/jpmarindiaz/samplepkg
我可以在 repo 公开时通过 R 解释器使用以下任何命令安装它:
install_github("jpmarindiaz/rdali")install_github("rdali",user="jpmarindiaz")install_github("jpmarindiaz/rdali",auth_user="jpmarindiaz")
但是当 git 存储库是私有的时,我得到一个错误:
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
我还没有弄清楚当 repo 是私有的时身份验证是如何工作的,有什么提示吗?
【问题讨论】:
-
只是猜测,您是否尝试设置密码参数?
-
听起来不错!
-
@agstudy 我真正讨厌的是,我必须以明文形式输入密码(最终它会保存在
.Rhistory中)。任何想法如何避免这种情况? -
@agstudy 哈哈我怎么会错过它……最好不要以明文形式输入密码!
-
@Beasterfield & jpmarindiaz 我没有要测试的私有存储库,但我会克隆我的存储库,使用
git clone或更好地手动使用Rstudio(从现有的 git 创建一个新包repository) ,然后你使用来自 `devtools. 的install()安装。