解决一下git clone失败的问题
创始人
2025-01-10 09:05:26
0

1).不开梯子,我们用https克隆

git clone https://github.com

报错:

Failed to connect to github.com port 443 after 2091 ms: Couldn't connect to server
解决办法:

开梯子,然后# 注意修改成自己的IP和端口号
git config --global http.proxy http://127.0.0.1:7890 
git config --global https.proxy http://127.0.0.1:7890
然后报错
remote: Repository not found.
fatal: repository 'https://github.co    not found
解决办法
git clone http://token名字:token的值@github.com/用户名/仓库.git
然后我这里突然翻墙了访问不了github了,包括huggingface等等网站

然后我改了下clash和电脑本机代理的端口号,就可以了
然后你要记得修改
git config --global http.proxy http://127.0.0.1:7891
git config --global https.proxy http://127.0.0.1:7891
然后我git clone http://github-private:github_pat_11A6PKn@github.com
报错remote: Repository not found.
fatal: Authentication failed for 'http://github.com/hlx11/ss1.git/'
然后我又用了我同事的token试了一下,依旧不行,我真的裂开
2)ssh尝试

那重新来一遍吧
重新配置key

ssh-keygen -t ed25519 -C "your_email@example.com"

然后复制id_ed25519.pub里面的东西

然后我们git clone git@github.com:lx1/sun01.git 
报错ssh: connect to host github.com port 22: Connection refused
fatal: Could not read from remote repository.

然后我们输入ssh -T git@github.com
发现Bad owner or permissions on C:\\Users\\lzt/.ssh/config
然后经过删除config之后

报错ssh: connect to host github.com port 22: Connection refused

3)突然再次尝试https,这次将http改为了https
git clone https://github-private:github_pat_11A6PKOQI0I69C55fd2wwRodMdPn6xgrGWUwT34n0WrBj6B225NCIAvuPBuLMu@github.com/lxhlx11/supe
报错remote: Write access to repository not granted.
fatal: unable to access 'https://github.com/lxhl01/': The requested URL returned error: 403

还是不行,但是我感觉快成功了

于是我用我同事(创建者的token)试了一下,终于成功了

远程分支创建后,本地与之关联
git checkout -b cxh origin/cxh

然后就可以快乐的提交代码啦
所以最后还是用https解决的

相关内容

热门资讯

黑科技免费"poke... 黑科技免费"poker有挂辅助吗!外挂透明挂辅助脚本(黑科技)线上教程"其实有挂;亲,关键说明,po...
app辅助挂(德扑ai)ai分... app辅助挂(德扑ai)ai分析可靠吗(AI)ai代打可靠(一贯真的是有挂);1、让任何用户在无需A...
黑科技辅助"德州辅助... 黑科技辅助"德州辅助dto!外挂透明挂辅助助手(黑科技)技巧教程"确实有挂1、下载好德州辅助dto辅...
详细黑科技(aaPOKER)外... 详细黑科技(aaPOKER)外挂怎么获取(透视)有作弊(原来真的有挂)1、系统规律教程、辅助透视等服...
黑科技ai代打"wp... 黑科技ai代打"wpk有平衡机制吗!外挂透明挂辅助下载(黑科技)玩家教程"竟然有挂;1、许多玩家不知...
智能ai辅助挂(德州ai)软件... 智能ai辅助挂(德州ai)软件铺牌器(Ai)外挂(切实有挂)1、许多玩家不知道辅助软件怎么退出观战2...
黑科技规律"wepo... 黑科技规律"wepoke存在外挂么!外挂透明挂辅助下载(黑科技)介绍教程"都是是有挂;1)wepok...
辅助挂辅助挂(德扑)ai智能工... 辅助挂辅助挂(德扑)ai智能工具(AI)ai助手(本来是真的有挂)辅助器中分为三种模型:软件透明挂辅...
黑科技辅助"德州数据... 黑科技辅助"德州数据辅助器!外挂透明挂辅助工具(黑科技)我来教教你"果然是有挂1、超多福利:超高返利...
辅助辅助挂(德州ai)透牌器(... 辅助辅助挂(德州ai)透牌器(Ai)插件(确实是有挂)1、进入游戏-大厅左侧-新手福利-激活码辅助透...