问题描述
使用git从我的电脑连接到github时出现问题。系统Win 7.
我通过代理连接,所以我在git配置文件中指定它(通常在git文件夹和git repo文件夹中)。要做到这一点,我进入了我的git bush的下一行:
$ git config --global http.proxy http://< ;用户名>:其中userpsw> @<代理>:其中端口>
它在其他程序(如:maven)上的工作方式如下所示:
< username> - 我登录我们的公司系统
< userpsw> - 我的密码到法团系统
< proxy> - 10.65.64.77
< port> - 3128
但是,当我尝试推送或克隆我的回购时,我收到了
致命:无法访问'<回购githup链接>'CONNECT
我尝试输入的不仅仅是我的用户名,还有域名\用户名,如果代码语言表存在问题,请更改我的密码。而且我甚至输入了错误的密码。错误保持不变。
当我进入'10 .65.64.177.com'并尝试推回购时,我收到:
致命:无法访问'< repo github链接>':无法连接到github.com:3128;没有错误
只是不知道该怎么尝试。
对我来说,什么工作与rohitmohta提出的相似,在常规的DOS命令提示符下(而不是在git bash上):
第一个
git config --global http.proxy http:// username:password @ proxiURL:proxiPort
然后
git config --global http.sslVerify false
$ p $
$ b(我确认这是必要的:如果设置为true,则获得SSL证书问题:无法获得本地发行者证书错误)
在我的情况下,不需要定义all_proxy或者https_proxy变量
最后是
git clone https://github.com/someUser/someRepo.git
I have a problem while connecting to github from my PC, using git. System Win 7.
I have connection through proxy, so i specified it in git config files (both in general git folder, and in git repo folder). To do this i entered next line to my git bush:
$ git config --global http.proxy http://<username>:<userpsw>@<proxy>:<port>
The way it works on other programms (ex: maven) it looks like that:
<username> - my login to our corp system <userpsw> -my password to corporat system <proxy> - 10.65.64.77 <port> - 3128
But when i try to push or to clone my repo, i receive
fatal: unable to access '<repo githup link>' Received HTTP code 407 from proxy after CONNECT
I try already to enter not just my username but domain\username, changed my password in case there are problems with code language tables. And i even entered wrong password. Error stayed the same.
When i entered in '10.65.64.177.com' and tried to push repo, i received:
fatal: unable to access '<repo github link>': Failed connect to github.com:3128; No error
Just don't know what to try.
解决方案What worked for me is something similar to what rohitmohta is proposing ; in regular DOS command prompt (not on git bash) :
first
git config --global http.proxy http://username:password@proxiURL:proxiPort
then
git config --global http.sslVerify false
(I confirm it's necessary : if set to true getting "SSL certificate problem: unable to get local issuer certificate" error)
in my case, no need of defining all_proxy nor https_proxy variables
and finally
git clone https://github.com/someUser/someRepo.git
这篇关于git在CONNECT后从代理返回http错误407的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!