无法解析主机:bitbucket.org

huangapple go评论90阅读模式
英文:

Could not resolve host: bitbucket.org

问题

在我的Ubuntu服务器上出现了一些空间问题。我释放了空间,然后尝试执行git pull命令,但是出现了以下错误:

$ git pull
fatal: unable to access 'https://<user>@bitbucket.org/<repo>.git/': Could not resolve host: bitbucket.org

我运行了以下命令:

git remote -v

输出结果如下(符合预期):

origin  https://<user>@bitbucket.org/<repo>.git (fetch)
origin  https://<user>@bitbucket.org/<repo>.git (push)

我还尝试通过以下命令删除并重新设置origin:

git remote rm origin
git remote add origin https://user@bitbucket.org/user/ex.git

此外,npm install命令也无法正常工作,一直卡住。我已经检查了我的互联网连接,但无论如何都没有成功。希望能得到帮助。

英文:

There was some space issue on my ubuntu server. I freed up the space and later tried to do git pull. I am getting an error like

$ git pull
fatal: unable to access &#39;https://&lt;user&gt;@bitbucket.org/&lt;repo&gt;.git/&#39;: Could not resolve host: bitbucket.org

I have ran the below commands:

git remote -v

Output: (as expected)

origin  https://&lt;user&gt;@bitbucket.org/&lt;repo&gt;.git (fetch)
origin  https://&lt;user&gt;@bitbucket.org/&lt;repo&gt;.git (push)

Have also tried by removing the origin and setting it again by:

git remote rm origin
git remote add origin https://user@bitbucket.org/user/ex.git

Also npm install isn't working, it is stuck. Checked my internet connection as well but no luck in any case. Any help would be appreciated.

答案1

得分: 2

“Could not resolve host”是一个DNS问题。您应该在网络设置中检查您的DNS配置,这将取决于您的操作系统。如果您的本地DNS缓存或ISP的DNS出现故障,您可能需要配置一个备用的公共DNS服务器(例如:Google:8.8.8.8,Cloudfare:1.1.1.1)。

英文:

Could not resolve host is a DNS issue. You should review your DNS configuration in your Network Settings which will depend on your OS. If your local DNS cache or ISP's DNS is failing, you might want to configure a backup public DNS server (Ex: Google: 8.8.8.8, Cloudfare: 1.1.1.1).

huangapple
  • 本文由 发表于 2023年8月9日 14:46:17
  • 转载请务必保留本文链接:https://go.coder-hub.com/76865225.html
匿名

发表评论

匿名网友

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen:

确定