简体   繁体   English

Bitbucket Git远程HTTPS连接被拒绝

[英]Bitbucket Git Remote HTTPS connection refused

I am trying to pull from a remote repo using https -- I don't have the ability on the machine I am using to configure ssh.我正在尝试使用 https 从远程仓库中拉取数据——我没有能力在我用来配置 ssh 的机器上。 I have been stuck on this error for a while.我已经被这个错误困住了一段时间。 At no point am I prompted to enter a password.在任何时候都不会提示我输入密码。

error: Failed connect to bitbucket.org:3128; Connection refused while 
accessing https://MYUSER@bitbucket.org/MYUSER/REPO.git/info/refs
fatal: HTTP request failed

I figured it out once I realized that no one else was encountering this error on the port number I was seeing (3128).一旦我意识到没有其他人在我看到的端口号(3128)上遇到此错误,我就想通了。 Turns out it was a local proxy setting.原来这是一个本地代理设置。 This answer fixed it for me.这个答案为我修复了它。

Even if you don't have a local proxy set up this/similar error can still show up if your internet latency is a bit off and its also possible that bitbucket is throttling private unpaid repos.即使您没有设置本地代理,如果您的互联网延迟有点低,并且 bitbucket 也可能限制私人未付费回购,则仍然会出现此/类似错误。 It looks like the timeout for connections is rather aggressive.看起来连接超时相当激进。 You can get an error such as the one below for any remote branch operations.对于任何远程分支操作,您都可能收到如下错误。

"Failed to connect to bitbucket.org port 443: Connection refused" “无法连接到 bitbucket.org 端口 443:连接被拒绝”

Unfortunately the solution is rather dumb....keep trying till it succeeds and it will it appears from my experience.不幸的是,该解决方案相当愚蠢......继续尝试直到它成功,它会根据我的经验出现。

Get the IP address of bitbucket.org from ping command in some other system.在其他系统中通过 ping 命令获取bitbucket.org的 IP 地址。 Then edit the /etc/hosts file with this IP.然后使用此 IP 编辑 /etc/hosts 文件。 This worked for me.这对我有用。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM