【发布时间】:2021-02-20 14:51:13
【问题描述】:
我在从这个私人 gitlab account 安装软件包时遇到问题。我通过 PuTTYgen 生成了公钥和私钥,并用它与上述网站进行通信。这是我从网站上使用的一段代码:
install.packages("devtools")
install.packages("git2r")
library(devtools)
library(git2r)
creds <- git2r::cred_ssh_key("~/.ssh/id_rsa.pub", "~/.ssh/id_rsa")
pkglist <- c("AIRSpec", "Rfunctools", "APRLspec", "APRLmpf", "APRLmvr", "APRLssb")
for(pkg in pkglist) {
print(paste("Installing package:", pkg, "..."))
## install package
devtools::install_git(sprintf("git@gitlab.com:aprl/%s.git", pkg),
credentials = creds)
## install dependencies
descr <- readLines(file.path(.libPaths(), pkg, "DESCRIPTION"))
deps <- strsplit(sub("^Imports: ", "", grep("^Imports: ", descr,
value=TRUE)), ", ")
if (exist("deps$1")) install.packages(deps[[1]])
}
但是,我收到以下错误消息:
"Error: Failed to install 'unknown package' from Git: Error in 'git2r_remote_ls': Failed to retrieve list of SSH authentication methods: Failed getting response"
感谢任何帮助或建议!
诺鲁拉
【问题讨论】:
标签: r ssh gitlab devtools libgit2