gpt4 book ai didi

git - 无法连接到 bitbucket.org 端口 443 : Network is unreachable

转载 作者:IT王子 更新时间:2023-10-29 01:26:26 24 4
gpt4 key购买 nike

我在推送代码时遇到问题。

git push origin master

fatal: unable to access 'https://xxxxxxxxxx@bitbucket.org/xxxxxx/xxxxxx.git/':
Failed to connect to bitbucket.org port 443: Network is unreachable

如何避免该错误消息?

最佳答案

TLDR;先试试 git push -4 origin master


有问题报告当前通过 https 访问 bitbucket 的问题(issue 13060issue 12184)

通常的答案是:

"Failed to connect" errors could be anything from DNS issues to local network problems to ISPs that are incompletely routing Bitbucket traffic. Unfortunately, there isn't enough detail in any of these comments to diagnose the exact problems, which may or may not be related to each other. If you could, please open a support ticket with the results of the following commands:

For OS X, Linux, and other UNIX-based operating systems:

ping -c10 bitbucket.org
ping6 -c10 bitbucket.org
traceroute bitbucket.org
traceroute6 bitbucket.org
GIT_CURL_VERBOSE=1 git ls-remote https://bitbucket.org/bitbucket/do_not_delete

For Windows:

ping -n 10 bitbucket.org
ping -n 10 -6 bitbucket.org
tracert bitbucket.org
tracert -6 bitbucket.org

(To clarify: "ping6" and "traceroute6" are the IPv6 equivalents of "ping" and "traceroute", respectively, and "GIT_CURL_VERBOSE=1" before any git command will detail all the HTTP-specific parts of the connection.
On the Windows side of things, the "-6" in the command line specifies that your computer should use IPv6 for the ping or tracert.)

Additionally, if you suspect that your problem is related to Bitbucket's IPv6 support, then you should be able to test your overall IPv6 connectivity by opening the following links in your browser:

https://ipv6.google.com
https://www.v6.facebook.com

Those links should not work at all if your IPv6 connection is disabled or misconfigured.


更一般地说,检查您的/etc/hosts 是否有任何关于 bitbucket.org 的条目。
参见“What are the Bitbucket Cloud IP addresses I should use to configure my corporate firewall?

最近更改了 IP 地址:

Since July 28, 2018: IPv4 inbound for bitbucket.org, api.bitbucket.org, and altssh.bitbucket.org

18.205.93.0/25
18.234.32.128/25
13.52.5.0/25

牢记ping might be blocked , 触发相同的错误消息。


IPV6 可能有问题:同一线程建议:

This is probably coming when git is trying to push over IPV6. I'm not exactly sure why getting this error with IPV6. But here are different solutions, that you can use to fix this problem.

Add any one of the following IP into /etc/hosts file to force git to use IPV4

104.192.143.2
104.192.143.3
104.192.143.1

That is,

104.192.143.2 bitbucket.org

To /etc/hosts file

(Or)

Upgrade your git to latest version. Probably this could solve the problem else use the following option when you push after you upgrade git (this feature was added newly to git)

 -4, --ipv4 use IPv4 addresses only

That is ,

git push -4 bitbucket dev

You can specify this option -4 while you push, pull or clone.

(Or)

You may configure git to use http proxy to solve this problem

 git config --local http.proxy http://proxyuser:proxypwd@proxy.server.com:8080

If you are already using latest version of git, you can simply use option -4 to force git to use IPV4 address or you can go with /etc/hosts

If you wanna see debug message while pushing or pulling code you can set following environment variable before you do so,

export GIT_CURL_VERBOSE=1

关于git - 无法连接到 bitbucket.org 端口 443 : Network is unreachable,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/38606443/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com