如何解决因网络问题导致的 github 下载出错

适用于 ubuntu 20.04
ubuntu 20.04 是 “西柚云” 主要使用的操作系统 西柚云官网

你还在因为 github 访问太慢而感到焦虑吗?
你还在因为无法访问 github 导致的一系列问题而感到苦恼吗?
克隆仓库报错?
安装 R 包失败?
github 抽风了?
无所谓,我会出手!

使用 git 访问 github

报错信息:
fatal:unable to access ‘https://github.com/wu-yc/scMetabolism.git/’: gnutls_handshake() failed: Error in the pull function
在这里插入图片描述
解决办法:
使用github代理:
https://ghproxy.com

git clone https://github.com/wu-yc/scMetabolism.git
git clone https://ghproxy.com/https://github.com/wu-yc/scMetabolism.git

安装 R 包

报错信息:
Error: Failed to install ‘unknown package’ from GitHub:
gnutls_handshake() failed: Error in the pull function.
在这里插入图片描述
解决办法:
使用github代理,以 https://phproxy.com为例:
https://ghproxy.com

# 可能因为网络问题而导致下载 R 包失败
devtools::install_github("wu-yc/scMetabolism")
# 使用代理下载 R 包
remotes::install_git("https://ghproxy.com/https://github.com/wu-yc/scMetabolism.git")

使用 wget,curl 访问 github 相关的链接失败也可以参照此法!

看看我的其他文章呗:
网络的连通性之ping和github代理
如何安装 R包:内含使用 github代理的方式

更多 github 代理:
注意,不同 github 代理使用方式可能不一样!

https://hub.yzuu.cf/
https://hub.njuu.cf/
https://ghproxy.com/
https://github.moeyy.xyz/
https://kgithub.com/
https://gitclone.com/

在此对所有 github 代理的站长表示衷心的感谢!

猜你喜欢

转载自blog.csdn.net/weixin_64316191/article/details/128217181
今日推荐