无法连接到bitbucket.org端口443:网络无法访问 [英] Failed to connect to bitbucket.org port 443: Network is unreachable
问题描述
git push origin master
致命:无法执行访问'https://amanjayraaj@bitbucket.org/sharehawk/sharehawk.git/':
无法连接到bitbucket.org端口443:网络无法访问
如何避免该错误讯息?
TLDR ;先尝试 git push -4 origin master
有问题报告当前通过https访问bitbucket的问题(问题13060 , issue 12184 )
通常的答案是:
未能连接错误可能是从DNS问题到本地网络问题到ISP完全路由Bitbucket流量的任何事情。不幸的是,这些评论中没有足够的细节来诊断确切的问题,这些问题可能会或可能不会彼此相关。如果可以的话,请用以下命令的结果打开支持服务单:
对于OS X,Linux和其他基于UNIX的操作系统:
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
$ b
对于Windows:
ping -n 10 bitbucket.org
是
ping -n 10 -6 bitbucket.org
tracert bitbucket.org
tracert -6 bitbucket.org
$ c $ (澄清:ping6
和> $ bcode> traceroute6ping
和traceroute
,并在任何git
命令之前分别使用GIT_CURL_VERBOSE = 1
来详细说明所有HTTP特定部分连接。
On th在命令行中的-6
指定您的计算机应将IPv6用于ping或tracert $ c另外,如果您怀疑您的问题与Bitbucket的IPv6支持相关,那么您应该可以通过打开以下内容来测试您的整体IPv6连接性:
您的浏览器中的链接:
https://ipv6.google.com
https://www.v6.facebook.com
这些链接应该如果您的IPv6连接被禁用或配置错误,则根本不工作。
IPV6可以有问题:相同的线程建议:
当git尝试推送IPV6时,可能会出现这种情况。我不完全确定为什么使用IPV6出现此错误。
将以下IP中的任何一个添加到/ etc / hosts文件中,以强制git使用IPV4
104.192.143.2
104.192.143.3
104.192.143.1
即
104.192.143.2 bitbucket.org
至
/ etc / hosts文件
将你的git升级到最新版本。或许这可以解决问题,否则当你升级git后(这个功能被新添加到git中),你可以使用下面的选项:
-4,--ipv4仅使用IPv4地址
即
git push -4 bitbucket dev
您可以指定
代理解决这个问题-4 $ c $您可以将git配置为使用http。
git config --local http.proxy http:// proxyuser :proxypwd@proxy.server.com:8080
如果你已经在使用最新版本的git,你可以简单地使用选项
-4
强制git使用IPV4地址,或者你可以使用/ etc / hosts
如果你想看在推或拉代码时调试消息,您可以在设置之前设置以下环境变量,
export GIT_CURL_VERBOSE = 1
I am getting issue while pushing code.
git push origin master fatal: unable to access 'https://amanjayraaj@bitbucket.org/sharehawk/sharehawk.git/': Failed to connect to bitbucket.org port 443: Network is unreachable
How to avoid that error message?
解决方案TLDR; Try first
git push -4 origin master
There are issues reporting current problems to access bitbucket through https (issue 13060, issue 12184)
The usual answer is:
"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 anygit
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 ortracert
.)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.
The IPV6 can be problematic: the same thread advises:
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
这篇关于无法连接到bitbucket.org端口443:网络无法访问的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!