git报错fatal: unable to access 'https://****.com/c*****5/ecmall.git/': Could not resolve host: gitlab.***k.com

虽然不知道什么原因,网上的方法 unset host:proxy之类都不管用

后来重新设置一下username和password就ok了

git config --global user.name ****

git config --global user.password ****

上面的做法还是不行

试试下面

现象:

原因:git在拉去代码时找不到hostname,git路径中git@gitlab.yto.net.cn:new_yonmen/carrier.git中的域名不存在,需要配置host文件,或者修改域名为ip

解决办法:为了方便以后的下载,建议修改host文件,

hosts中增加

10.1.221.231 gitlab.yto.net.cn 

原文地址:https://www.cnblogs.com/caicaizi/p/14325214.html