我在使用git从PC连接到github时遇到问题。System Win 7。
我通过代理连接,所以我在git配置文件中指定了它(在通用git文件夹和git repo文件夹中)。为了做到这一点,我在我的git步调中输入了下一行:
$ git config --global http.proxy http://<username>:<userpsw>@<proxy>:<port>
它在其他程序(例如: maven)上的工作方式如下所示:
<username> - my login to our corp system
<userpsw> -my password to corporat system
<proxy> - 10.65.64.77
<port> - 3128
但当我尝试推送或克隆我的存储库时,我会收到
fatal: unable to access '<repo githup link>' Received HTTP code 407 from proxy after CONNECT
我已经尝试不仅输入我的用户名,而且还输入domain\ username,更改了我的密码,以防代码语言表出现问题。我甚至输入了错误的密码。错误保持不变。
当我输入'10.65.64.177.com‘并尝试推送repo时,我收到了:
fatal: unable to access '<repo github link>': Failed connect to github.com:3128; No error
只是不知道该怎么尝试。
发布于 2015-04-23 16:49:44
对我来说起作用的是类似于rohitmohta的建议;在常规的DOS命令提示符下(而不是在git bash上):
第一
git config --global http.proxy http://username:password@proxiURL:proxiPort
在某些情况下,还
git config --global https.proxy http://username:password@proxiURL:proxiPort
然后
git config --global http.sslVerify false
(我确认这是必要的:如果设置为true,则会出现"SSL证书问题:无法获取本地颁发者证书“错误)
在我的例子中,不需要定义all_proxy变量
最后
git clone https://github.com/someUser/someRepo.git
发布于 2018-12-28 17:23:52
强制git将凭据和认证方式发送给代理需要使用以下命令:
git config --global http.proxyAuthMethod 'basic'
来源:https://git-scm.com/docs/git-config#git-config-httpproxyAuthMethod
发布于 2014-09-16 01:31:59
我在Windows环境中也遇到了同样的问题。
我刚刚解决了NTLM-APS (一种Windows NT身份验证代理服务器)
配置您的NTML代理并将Git设置为:
git config --global http.proxy http://<username>:<userpsw>@localhost:<port>
https://stackoverflow.com/questions/24907140
复制相似问题