【问题标题】:Failed to connect to bitbucket.org port 443: No route to host无法连接到 bitbucket.org 端口 443:没有到主机的路由
【发布时间】:2020-10-05 15:47:49
【问题描述】:

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

【问题讨论】:

  • 您的网络或 Internet 连接有问题。这不是编程问题,而且是题外话。
  • 离题,但此提示可能会有所帮助:检查您的代理设置。

标签: git bitbucket


【解决方案1】:

我也遇到了同样的问题。

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

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

104.192.143.2 bitbucket.org

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

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

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

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

【讨论】:

  • linux平台怎么样?
  • 我使用的是 Linux mint 17.x
  • 这个解决方案在 ubuntu 14.04 上为我解决了这个问题,谢谢 Rohan
  • 2020:Bitbucket 自 2018 年起更改了其 IP。可在此处找到新的 IP (bitbucket.org/blog/new-ip-addresses-bitbucket-cloud)。我正在使用 IPv6 之一:2406:da00:ff00::0/96*
  • 在我的情况下添加了 104.192.141.1 bitbucket.org 我检查了另一台机器的 IP 地址。
【解决方案2】:

更新:2018 年 8 月 28 日

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

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

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

替换 104.192.143.3 bitbucket.org

18.205.93.0 bitbucket.org

谢谢

【讨论】:

    【解决方案3】:

    建议1:只需删除你的原点并重新设置原点,然后尝试推/拉。希望它会起作用。

     git remote -v
     git remote remove origin
     git remote add origin https://habibbd@bitbucket.org/ocplbd/bida-oss.git 
    

    建议 2:如果其中任何一行可用,请从 Windows/System32/drivers/etc/hosts 中删除这些行。

     104.192.143.1 bitbucket.org
     104.192.143.2 bitbucket.org
     18.205.93.0 bitbucket.org
    

    建议 3: 更改网络连接/提供商。有时您的网络提供商会导致此类问题。

    建议 4: 检查防火墙设置。有时是显示此类错误的问题。

    【讨论】:

      【解决方案4】:

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

      【讨论】:

        【解决方案5】:

        我尝试将 bitbucket.org 替换为服务器的 ip,即 104.192.143.2 在 repo 的源 url 中, git@bitbucket.org:xyz/xyz.git 到 git@104.192.143.2:xyz/xyz.git 这在 plesk 服务器上克隆 repo 时有效

        【讨论】:

          猜你喜欢
          • 1970-01-01
          • 2018-12-16
          • 1970-01-01
          • 2019-02-02
          • 2017-10-07
          • 1970-01-01
          • 1970-01-01
          • 1970-01-01
          • 2012-04-01
          相关资源
          最近更新 更多