公司内网一个Gitlab的git仓库
git remote -v origin http://xxx.corp.com:xx/data_xxx/appcrawler.git (fetch) origin http://xxx.corp.com:xx/data_xxx/appcrawler.git (push)
本地去git操作始终错误:
git pull fatal: unable to access 'http://x.corp.com:x/data_xxx/appcrawler.git/': Empty reply from server
后来发现,貌似是前些天设置的全局代理的问题?
#git config --global http.proxy socks5://127.0.0.1:51837 git config --global --unset http.proxy master ● git config --global http.proxy
然后再去试试
就可以了:
● git pull error: Your local changes to the following files would be overwritten by merge:
-》说明的确是之前无意间设置的git的全局代理导致的。
以后要注意。
【后记20210120】
后来又遇到这种问题了:
(venv) xxx@xxx ~/dev/xxx/crawler/appAutoCrawler/AppCrawler master ● git pull fatal: unable to access 'http://xxx:yyy/zzz/appcrawler.git/': Empty reply from server

去看看是否是全局代理导致的
git config --global
没有输出。
查看当前git的代理
git config http.proxy socks5://127.0.0.1:51837
果然有代理。
去掉代理:
git config --global --unset http.proxy master git config http.proxy
即可正常git pull了:
git pull Already up to date.

转载请注明:在路上 » 【已解决】Gitlab仓库git pull报错fatal: unable to access Empty reply from server