git 无法连接到 bitbucket.org 端口 443:没有到主机的路由

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/38480098/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-09-19 12:07:03  来源:igfitidea点击:

Failed to connect to bitbucket.org port 443: No route to host

gitbitbucket

提问by Sameer Shaikh

I am getting error as Failed to connect to bitbucket.org port 443: No route to hostwhen i try to pull or push. The same repositories are available to pull push outside our network. What could be the problem as it was working properly.

我收到错误,因为无法连接到 bitbucket.org 端口 443:当我尝试拉或推时,没有到主机的路由。相同的存储库可用于在我们的网络之外拉推。可能是什么问题,因为它工作正常。

回答by Rohan Khude

I also got same issue.

我也遇到了同样的问题。

I tried to update git by ppa, Reset .gitconfig,i checked github repo is getting clone but not bitbucket, i unset http and https proxy, restarted my network services(type in terminal - 'my network services'), changed the network that my laptop was connected. But none of this work for me.

我尝试通过 ppa 更新 git,重置 .gitconfig,我检查了 github repo 正在获取克隆但不是 bitbucket,我取消了 http 和 https 代理,重新启动了我的网络服务(输入终端 - “我的网络服务”),改变了网络我的笔记本电脑已连接。但这些都不适合我。

I fixed itby adding below line to hosts(/etc/hosts) file

我通过在(/etc/hosts) 文件中添加以下行来修复它hosts

104.192.143.2 bitbucket.org

Another solutions i didn't tried are -

我没有尝试过的另一个解决方案是 -

Using proxy for cloning git, Connecting to Bitbucket using ssh through proxy.

使用代理克隆 git,通过代理使用 ssh 连接到 Bitbucket。

This solution will also work for the below error:

此解决方案也适用于以下错误:

Failed to connect to bitbucket.org port 443: Network is unreachable

无法连接到 bitbucket.org 端口 443:网络无法访问

回答by Abdul Hameed

UPDATE: 28-08-2018

更新:28-08-2018

This is Tempfix but at least working for me after bitbucket new IP's

这是临时修复,但至少在 bitbucket 新 IP 之后对我有用

Note:- hostsfile can be found in windows at C:\Windows\System32\drivers\etcand in Linux it exists at /etc/hosts. make sure you edit with admin rights i.e in windows open notepad as administrator and then open host file. In linux sudo gedit /etc/hostsfrom terminal from any location :)

注意:-hosts文件可以在 windows 中找到C:\Windows\System32\drivers\etc,在 Linux 中它存在于/etc/hosts. 确保您使用管理员权限进行编辑,即在 Windows 中以管理员身份打开记事本,然后打开主机文件。在sudo gedit /etc/hosts来自任何位置的终端的linux 中:)

for all new users or existing users who previously edited etc/hostsfile and now stopped working just replace the old IP address of bitbucket with new one i.e in etc/hosts

对于所有新用户或以前编辑过etc/hosts文件但现在停止工作的现有用户,只需将 bitbucket 的旧 IP 地址替换为新的,即etc/hosts

REPLACE 104.192.143.3 bitbucket.org

代替 104.192.143.3 bitbucket.org

TO 18.205.93.0 bitbucket.org

18.205.93.0 bitbucket.org

Thanks

谢谢

回答by wembikon

just restart your network connection. in ubuntu linux: sudo service network-manager restart. check if you're now connected to the internet by pinging some known websites like: ping yahoo.com or bitbucket.org

只需重新启动您的网络连接。在 ubuntu linux 中:sudo service network-manager restart。通过 ping 一些已知网站来检查您现在是否已连接到互联网:ping yahoo.com 或 bitbucket.org

回答by Saqib Ashraf

I tried replacing the bitbucket.org with ip of server i.e 104.192.143.2 in the source url of repo , [email protected]:xyz/xyz.git to [email protected]:xyz/xyz.git And this worked while cloning repo on plesk server

我尝试将 bitbucket.org 替换为服务器的 ip,即 repo 的源 url 中的 104.192.143.2,[email protected]:xyz/xyz.git 到 [email protected]:xyz/xyz.git 这在克隆时起作用plesk 服务器上的 repo