Ubuntu22.04系统:fatal: 无法连接到 github.com

2024-04-16 0 136
目录
  • 一、从github使用Git Clone遇到问题:
    • 解决方案一:
    • 解决方案二:
    • 解决方案三:

一、从github使用Git Clone遇到问题:

git clone git://github.com/***/***.git时提示:

正克隆到 'caffe'… fatal: 无法连接到 github.com:

github.com[0: 20.205.243.166]: errno=连接超时

Ubuntu22.04系统:fatal: 无法连接到 github.com

解决方案一:

这种错误一般是由于使用git://***下载会出现,改成使用https://方式访问即可。

重新执行克隆命令,结果如下图所示:

Ubuntu22.04系统:fatal: 无法连接到 github.com

解决方案二:

执行以下命令:

git config –global url.https://github.com/.insteadOf git://github.com/
git config –global url.\”https://\”.insteadOf git://

解决方案三:

1、执行以下命令:

vim ~/.gitconfig

或:

vim ~/.git/config

2、输入以下内容:

[url \”git@github.com:\”]
pushInsteadOf = git://github.com/
pushInsteadOf = https://github.com/

3、保存修改:

:wq

以上三种方案都可解决问题,重新执行克隆命令,结果如下图所示:

Ubuntu22.04系统:fatal: 无法连接到 github.com

到此这篇关于Ubuntu22.04系统:fatal: 无法连接到 github.com的文章就介绍到这了,更多相关fatal: 无法连接到 github内容请搜索悠久资源网以前的文章或继续浏览下面的相关文章希望大家以后多多支持悠久资源网!

收藏 (0) 打赏

感谢您的支持,我会继续努力的!

打开微信/支付宝扫一扫,即可进行扫码打赏哦,分享从这里开始,精彩与您同在
点赞 (0)

悠久资源 Linux服务器 Ubuntu22.04系统:fatal: 无法连接到 github.com https://www.u-9.cn/server/linux/184998.html

常见问题

相关文章

发表评论
暂无评论
官方客服团队

为您解决烦忧 - 24小时在线 专业服务