项目场景:
在开发过程中,会遇到git拉取提交操作。最近拉取主分支代码的时候,提示拉取失败
问题描述
提示如下:
Update failed
unable to access 'http://xxx.xxx.com/xxx/xxx.git/: Could not resolve host xxx.xxx.com
原因分析:
出现这个问题,一般是域名对应IP发生变化,git拉取时访问不到造成的。
解决方案:
两种解决方法:
第一种:
本地 host文件 域名对应的IP 替换成新的。
host文件地址:C:\Windows\System32\drivers\etc
第二种:
在idea中找到git 地址,把域名替换成新IP 来解决。 Git ---> Manage Remotes文章来源:https://www.toymoban.com/news/detail-752798.html
文章来源地址https://www.toymoban.com/news/detail-752798.html
到了这里,关于Git 拉取代码提示 unable to access ‘http://xxx.xxx.com/xxx/xxx.git/: Could not resolve host 异常解决的文章就介绍完了。如果您还想了解更多内容,请在右上角搜索TOY模板网以前的文章或继续浏览下面的相关文章,希望大家以后多多支持TOY模板网!