git企业网络上的SSL问题

时间:2017-10-23 19:18:34

标签: git ssl bitbucket

我正在尝试从Bitbucket检出我的git存储库。我结账了,但是这个得到了:

pi@raspberrypi:~/Documents$ git clone https://user@bitbucket.org/user/project.git
Cloning into 'project'...
fatal: unable to access 'https://user@bitbucket.org/user/project.git/': SSL: certificate subject name (guestlogin.mycompany.com) does not match target host name 'bitbucket.org'

我在这里阅读了其他一些帖子,并在禁用SSL验证后再次尝试:

pi@raspberrypi:~/Documents$ git -c http.sslVerify=False clone https://user@bitbucket.org/user/project.git
Cloning into 'project'...
fatal: https://user@bitbucket.org/user/project.git/info/refs not valid: is this a git repository?

我担心的一些问题是我在企业网络背后。我可以做些什么来解决这个问题吗?

修改 令我困惑的是,如果我将手机连接到企业wifi,在手机上启用移动热点,然后将计算机(raspberry pi)连接到移动热点,克隆工作正常。但是,如果我将raspberry pi直接连接到公司网络(PEAP),我会遇到SSL问题。

1 个答案:

答案 0 :(得分:0)

这肯定是由你和Bitbucket之间的代理服务器引起的。 https://confluence.atlassian.com/bitbucketserverkb/can-t-clone-or-pull-due-to-a-git-outbound-proxy-779171769.html的指示特别提到Bitbucket Server(自托管版本,而不是bitbucket.org),但代理指令应该适合您。如果他们不这样做,那就和你公司的网络人员交谈,看看你能想出什么。

如果您的公司网络允许,您也可以使用SSH。我强烈建议反对http.sslVerify=False - 它不仅告诉你确切的问题(你要到内部代理服务器而不是Bitbucket)但它也可以保护你免受许多人的影响 - 中间攻击。

相关问题