Q -我安装了git来获得最新版本的Angular。当我试图逃跑的时候

git clone https://github.com/angular/angular-phonecat.git

我得到失败连接到github 443错误

我甚至尝试过

git clone git://github.com/angular/angular-phonecat.git

这给了我失败的连接没有错误消息。

我在公司的防火墙后面。当我进入控制面板->Internet选项->连接-> LAN设置时,我无法看到我的代理详细信息。IT人员不会和我分享代理信息。我不知道该怎么办?

我终于做到了。我将更新我所采取的程序,以便 只是想编译所有的步骤,我做了让它工作


当前回答

在企业环境中,“我们的”git安装使用了安装目录中的gitconfig文件,而不是标准的C:\users<you>。gitconfig文件。

这向我展示了gitconfig文件的位置:gitconfig——list——show-origin

通过添加以下内容编辑文件:

[remote "origin"]
    proxy = http://proxyserver:port
[http]
    proxy = http://proxyserver:port
[https]
    proxy = http://proxyserver:port

同时,我的装置

[credential]
    helper = manager

现在我可以讲外部回购了。

其他回答

(不是答案,而是一个非常相似的问题) 我在代理后面的Windows系统上安装了Git Gui。从运行在Windows系统上的Linux虚拟机上发布“git克隆”是可行的,但是git Gui会产生标题中提到的443错误。

要解决这个问题,必须编辑%USERPROFILE%\。添加一个[http] section:

[http]
    postBuffer = 1000000000
    proxy = the.proxy.address:the.proxy.port
    sslcainfo = C:/Users/username/Documents/the.certificate.name.cer

请注意,安全证书文件的路径已将反斜杠('\')替换为斜杠('/')。

我按照下面的步骤做了

Google the error Got to SO Links(here, here) which suggested the same thing, that I have to update the Git Config for proxy setting Damn, can not see proxy information from control panel. IT guys must have hidden it. I can not even change the setting to not to use proxy. Found this wonderful tutorial of finding which proxy your are connected to Updated the http.proxy key in git config by following command git config --global http.proxy http[s]://userName:password@proxyaddress:port Error - "could not resolve proxy some@proxyaddress:port". It turned out my password had a @ symbol in it. Encode @ in your password to %40, because git splits the proxy setting by @ If your userName is a email address, which has @, also encode it to %40. (see this answer) git config --global http.proxy http[s]://userName(encoded):password(encoded)@proxyaddress:port

Baam !它工作!

注:我只是想为像我这样的灵魂回答这个问题,谁会来寻找答案的SO:D

我得到了:

git config --global http.proxy http://{domain}\\\{username}:{password}@{proxy ip}:{proxy port}

git config --global http.sslverify false

虽然晚了,但它应该能帮助像我这样的人: 对我来说有用的是有点方便,但上面没有人说过,所以我添加了它:

解决方案: 我不得不取消设置两个http。Proxy和http . Proxy

git --global --unset http.proxy
git --global --unset https.proxy

我有与公司代理打交道的丰富经验。 配置通常工作得很好

但是如果你已经配置了代理,并且无法使用git(总是得到443错误),请尝试检查是否有一个remote.origin.proxy绕过了你的配置。

git config --list --show-origin

如果你检查"remote。origin。Proxy "被配置为空值,尝试取消设置它或几乎设置它与您的公司代理:

git config --add remote.origin.proxy "http://[yourproxy]:[yourport]"

由于一些企业网站有不受信任的证书,我建议你避免证书检查,如果你使用ssl:

git config http.sslverify false    
git config --global http.sslverify false