我正在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")
第一个软件包的安装按预期工作,第二个软件包开始安装但因错误而停止,并且出于任何原因它提到了第一个已安装的软件包。请在最后的注释中查看错误。 我不知道为什么会发生这种情况以及如何解决它。
我再次添加了以下错误消息,因为我已经改变了一些内容。
很抱歉更改了auth_token
,但脚本现在应保持私密状态。
我还检查了只使用一个命令安装两个软件包但它会导致相同的错误消息。我还根据评论中的建议在我的环境中添加了GITHUB_PAT
变量,以便不公开使用身份验证令牌。
devtools::install_github(c("mariodejung/rMQanalysis","mariodejung/cfpscripts"),
ref="develop",
dependencies=TRUE)
此命令现在成功安装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)
我还使用了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)
UPDATE2
整个问题似乎是devtools 1.12.0
中的一个错误。它在1.11.1
中工作正常
我想,我的rMQanalysis
包在cfpscripts
中被称为Imports:
。如果我从Imports:
中删除此Description
语句,则该软件包安装正常
我仍然在想,为什么我不能设置dependencies=FALSE
来阻止install_github
安装依赖包。
我已经填写了devtools的错误报告但尚无反应。