无法解析主机:bitbucket.org

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

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)

我还尝试过通过以下方式删除并重新设置远程源:

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-2.html
匿名

发表评论

匿名网友

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

确定