运行devtools::release()准备在R中释放包时,git检查出错

运行devtools::release()准备在R中释放包时,git检查出错,r,devtools,cran,R,Devtools,Cran,我正在尝试使用devtools::release()向CRAN发布一个包。每当我进入运行Git检查的步骤时…就会出现一个错误 ── Running Git checks for fitzRoy ─────────────────────────────────────────────────────────────────────── Current branch: master Checking uncommitted files... OK Checking synchronisation

我正在尝试使用
devtools::release()
向CRAN发布一个包。每当我进入
运行Git检查的步骤时…
就会出现一个错误

── Running Git checks for fitzRoy ───────────────────────────────────────────────────────────────────────
Current branch: master 
Checking uncommitted files... OK
Checking synchronisation with remote branch...
ERROR: Error in 'git2r_remote_fetch': unsupported URL protocol
我在Mac电脑上。我一直在使用Git fine作为软件包,没有任何关于提交、推送和拉取的戏剧

我尝试过更新devtools、git2r,还安装了最新版本的Git,但没有成功

有什么建议吗

更新-找到了答案

基本上-您需要安装
libssh2
。在Mac电脑上,我按照指示操作

然后,我必须通过运行以下命令重新安装R的
git2r

install.packages("git2r", type = "source")

这样做并重新启动R后,错误消失了

在Ubuntu18.04上,我使用sudo安装了libssh2-1 libssh2-1-dev libgit2 dev,然后重新安装了git2r。不确定这三个是否都是必要的,但把它留着以防万一对某些人来说是有用的。