Solve the problem of github fatal: unable to access 'xxxx': Could not resolve host:xxx

I have encountered a strange problem in the past two days, that is, the push and pull of git are suddenly unavailable. Report the following error:report an error

Then I went to Google baidu and found a reliable solution:

First ping the code repository address:ping gitlab.alibaba-inc.com

If an error is reported:

ping

Then find a machine that can ping and see what the ip address is after ping:find ip address

The last step is to add the IP address and code repository address to the local hosts:add hosts file

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=325902841&siteId=291194637