无法在bitbucket上推送代码 - 端口443问题

时间:2016-01-31 20:01:22

标签: git proxy push bitbucket

我无法在bitbucket上推送代码。 当我运行此命令“git push origin branch_name”时,它会给出错误 -

致命:无法访问“https://user@bitbucket.org/folder/project.git/”:无法连接到bitbucket.org端口443:网络无法访问。

如何解决这个问题。有人帮忙吗?

2 个答案:

答案 0 :(得分:4)

解决方案1:更新主机文件

将bitbucket.org IP添加到/etc/hosts文件(这对我有用)

104.192.143.2 bitbucket.org

解决方案2:配置代理服务器

使用命令:

git config --global http.proxy http://proxyuser:proxypwd@proxy.server.com:8080
  • proxyuser更改为您的代理用户
  • proxypwd更改为您的代理密码
  • proxy.server.com更改为代理服务器的网址
  • 8080更改为代理服务器上配置的代理端口

如果您决定随时重置此代理并在没有代理的情况下工作:

使用命令:

git config --global --unset http.proxy

最后,检查当前设置的代理:

git config --global --get http.proxy

有关Getting git to work with a proxy server

的更多详情

答案 1 :(得分:0)

您是否可以通过浏览器或使用像curl这样的工具从该特定服务器访问Bitbucket? "网络无法访问"无论是在该系统上的网络配置还是在该系统与Bitbucket之间的网络中,都是一个非常有力的指标,表明存在问题。