通过devtools install_github安装r包的问题

drm*_*iod 12 r github devtools

我正在GitHub上开发两个包,我正在尝试使用该devtools::install_github()命令安装它们.

由于存储库是私有的,我auth_token为我的帐户创建了一个(据我所知,单个存储库没有办法做到这一点?)

devtools::install_github("mariodejung/rMQanalysis", 
                         auth_token="6cd2dbe8bd1f062842b90afXXXXXXXXXXXXXXXXX", 
                         ref="develop", 
                         dependencies=TRUE)
devtools::install_github("mariodejung/cfpscripts", 
                         auth_token="6cd2dbe8bd1f062842b90afXXXXXXXXXXXXXXXXX", 
                         ref="develop")
Run Code Online (Sandbox Code Playgroud)

第一个软件包的安装按预期工作,第二个软件包开始安装但因错误而停止,并且出于任何原因它提到了第一个已安装的软件包.请在最后的注释中查看错误.我不知道为什么会这样,以及如何解决它.

我再次添加了下面的错误消息,因为我已经改变了一些东西.

很抱歉更改了,auth_token但脚本现在应保持私密状态.

我还检查了只用一个命令安装两个包,但它导致相同的错误消息.我还GITHUB_PAT根据评论中的建议在我的环境中添加了变量,以便不公开使用身份验证令牌.

devtools::install_github(c("mariodejung/rMQanalysis","mariodejung/cfpscripts"), 
                         ref="develop", 
                         dependencies=TRUE)
Run Code Online (Sandbox Code Playgroud)

此命令现在rMQanalysis成功安装程序包,并在安装时失败并显示相同的错误消息cfpscripts.仍然不知道如何弄清问题是什么.它适用于其他机器.还安装了所有依赖项.

devtools::install_github(c("mariodejung/rMQanalysis","mariodejung/cfpscripts"), ref='develop', quiet=FALSE)
Using GitHub PAT from envvar GITHUB_PAT
Downloading GitHub repo mariodejung/rMQanalysis@develop
from URL https://api.github.com/repos/mariodejung/rMQanalysis/zipball/develop
Installing rMQanalysis
"C:/PROGRA~1/R/R-32~1.5/bin/x64/R" --no-site-file --no-environ --no-save --no-restore --quiet CMD INSTALL  \
  "C:/Users/cfproteomics/AppData/Local/Temp/RtmpktvmUK/devtools43850da641a/mariodejung-rMQanalysis-0e38dd3463ea830b19f0afa2ade6f2e14db93041"  \
  --library="C:/Users/cfproteomics/Documents/R/win-library/3.2" --install-tests 

* installing *source* package 'rMQanalysis' ...
** R
** data
*** moving datasets to lazyload DB
** inst
** tests
** preparing package for lazy loading
** help
No man pages found in package  'rMQanalysis' 
*** installing help indices
** building package indices
** installing vignettes
** testing if installed package can be loaded
*** arch - i386
*** arch - x64
* DONE (rMQanalysis)
Downloading GitHub repo mariodejung/cfpscripts@develop
from URL https://api.github.com/repos/mariodejung/cfpscripts/zipball/develop
Installing cfpscripts
Downloading GitHub repo mariodejung/rMQanalysis@develop
from URL https://api.github.com/repos/mariodejung/rMQanalysis/zipball/develop
Error in stop(github_error(request)) : Not Found (404)
Run Code Online (Sandbox Code Playgroud)

我也使用了这个traceback()功能,但它没有给出更多的见解......

15: stop(github_error(request))
14: download_github(dest, src, auth)
13: remote_download.github_remote(remote, quiet = quiet)
12: remote_download(remote, quiet = quiet)
11: FUN(X[[i]], ...)
10: vapply(remotes, install_remote, ..., FUN.VALUE = logical(1))
9: install_remotes(object$remote[behind], ..., quiet = quiet)
8: update.package_deps(pkg, ..., Ncpus = threads, quiet = quiet, 
       upgrade = upgrade)
7: update(pkg, ..., Ncpus = threads, quiet = quiet, upgrade = upgrade)
6: install_deps(pkg, dependencies = initial_deps, upgrade = upgrade_dependencies, 
       threads = threads, force_deps = force_deps, quiet = quiet, 
       ...)
5: install(source, ..., quiet = quiet, metadata = metadata)
4: FUN(X[[i]], ...)
3: vapply(remotes, install_remote, ..., FUN.VALUE = logical(1))
2: install_remotes(remotes, quiet = quiet, ...)
1: devtools::install_github(c("mariodejung/rMQanalysis", "mariodejung/cfpscripts"), 
       ref = "develop", quiet = FALSE)
Run Code Online (Sandbox Code Playgroud)

UPDATE2

整个问题似乎是一个错误devtools 1.12.0.它运作良好1.11.1.
我想通了,我的rMQanalysis包被提到cfpscriptsImports:.如果我Imports:从中删除此声明Description,则包安装正常.
我仍然在想,为什么我不能设置dependencies=FALSE阻止install_github安装依赖包.

我已经填写了关于devtools的错误报告,但还没有反应.

小智 3

您是否尝试过下载或克隆存储库[因为您已付费]并从源代码安装?

install.packages("/Path/to/source", repos=NULL, type="source")
Run Code Online (Sandbox Code Playgroud)