突然原本git链接仓库失败问题排查,竟然是少了.git

175 阅读1分钟

正常的git仓库远程地址后面都是跟有.git的,请记住,但是突然不知道什么时候,我的仓库后面少了.git这个。所以就一直报错连不上:

fatal: unable to access 'http://mxxxxxxxxxxx.cn:9999/mgnt-sys/frontmgntminiapp/': Failed to connect to xxxxxxxxx port 80 after 25 ms: Couldn't connect to server

出错的git远程地址:后面少了.git 

 

需要重新设置远程地址,并且加上.git:

git remote set-url origin 新的仓库地址

例如新地址:

git remote set-url origin http://mxxxxxxxx.cn:9999/mgnt-sys/frontgamepad.git

然后就可以了: