如何让git使用代理服务器?
我需要从git服务器检出代码,每次都显示"Request timed out".我该如何解决这个问题?
或者,如何设置代理服务器?
我在http代理后面工作.我正在尝试使用他们的"repo"工具克隆Android的源代码树.
此工具坚持使用git://URL,即使http://URL也有效.结果,我无法下载源代码.
有可能强制git总是使用http吗?
编辑:我的http_proxy配置正确.例如,这有效:
git clone http://android.git.kernel.org/platform/manifest.git
Run Code Online (Sandbox Code Playgroud)
但这不会(错误=连接超时):
git clone git://android.git.kernel.org/platform/manifest.git
Run Code Online (Sandbox Code Playgroud)
所以这个答案并没有真正帮助我.
我安装Socat通过HTTP CONNECT代理使用Git协议,然后我创建一个gitproxy在bin目录中调用的脚本.
#!/bin/sh
# Use socat to proxy git through an HTTP CONNECT firewall.
# Useful if you are trying to clone git:// from inside a company.
# Requires that the proxy allows CONNECT to port 9418.
#
# Save this file as gitproxy somewhere in your path (e.g., ~/bin) and then run
# chmod +x gitproxy
# git config --global core.gitproxy gitproxy
#
# More details at https://www.emilsit.net/blog/archives/how-to-use-the-git-protocol-through-a-http-connect-proxy/
# Configuration. Common proxy ports are 3128, 8123, 8000. …Run Code Online (Sandbox Code Playgroud) 是否可以将git配置为仅针对特定域使用代理?
我想使用我们的公司代理来访问Github,但是不能访问我们自己的内部git存储库.
我正在使用凉亭,它需要在我们的防火墙和github上都需要物品,所以我不能将它作为每个项目设置.它需要是某种全局配置选项.有什么想法吗?
我想运行go install安装游览,但我找不到使用代理进行互联网访问的选项.我不仅仅需要这次巡演,而是一般来自Go的开发.
如何配置Go以使用代理.
我在Git中使用TFS,为Git安装了Visual Studio Tools.
我试图从TFS中提取所有提交(共5个),但我在下面收到此错误:
An error occurred. Detailed message: An error was raised by libgit2.
Category = Checkout (MergeConflict).
2 conflicts prevent checkout
Run Code Online (Sandbox Code Playgroud)
我该如何解决这个问题?

我在Windows上使用Git,在公司网络上,我使用基本身份验证的HTTP代理.出站SSH不起作用,因此我必须通过代理使用HTTPS.
我知道如何使用git config http.proxy配置设置http://[username]:[password]@[proxy]:[port].
但是,特别是因为这是一台共享机器,我宁愿不将我的密码存储在我的.gitconfig.另外,更改我.gitconfig使用git config命令会在我的bash历史记录中留下我的密码,所以即使我记得.gitconfig在会话结束时清除我,我几乎肯定会忘记清除我的历史记录.
我试过设置http.proxy没有密码,徒劳地希望我在尝试推/拉时提示我输入密码,但我只需要407代理身份验证.我在网上找到的所有信息似乎都忽略了以明文形式保存密码的问题.gitconfig,或者处理NTLM代理.
我很乐意在每次需要连接时输入我的代理详细信息 - 目前我能看到的最佳解决方案是编写一个包装脚本,提示我输入密码并在调用时将其设置为环境变量git.这是一个不错的解决方案,并且在脚本中为单个调用设置环境变量是否有任何安全隐患?最好是否有可用于此的内置设置或现有工具?
我在代理后面使用msysgit.正如我所说的那样,让git与代理服务器一起工作
我已将系统变量http_proxy设置为值.后来我打电话
git config --global http.proxy $http_proxy
Run Code Online (Sandbox Code Playgroud)
但是,如果我打电话给:
git clone git://git.savannah.gnu.org/gnuprologjava.git
Run Code Online (Sandbox Code Playgroud)
它给出以下错误:
git.savannah.gnu.org[0; 140.186.70.72]: errno=No error
fatal: unable to connect a socket (No error)
Run Code Online (Sandbox Code Playgroud) 我想在工作时连接到GitHub并需要通过http代理.我可以使用命令使用cURL离开FTP
curl -v -g --ftp-pasv --upload-file MYFILE --proxy PROXYADDRESS:PROXYPORT --proxy-ntlm --proxy-user WINDOWSDOMAIN\WINDOWSUSER:WINDOWSPASSWORD ftp://FTPUSER:FTPPASS@FTPURL/
到目前为止我还没能为Git提供等效的设置.
我尝试按照cygwin下的使用Github通过Draconian代理的说明.
我已经安装了开瓶器并试图通过SSH连接到GitHub
ssh github.com
Run Code Online (Sandbox Code Playgroud)
要么
ssh ssh.github.com
Run Code Online (Sandbox Code Playgroud)
我回来了
ssh:无法解析主机名ssh.github.com:提供的主机名或服务名,或者未知.
我试过设置http和https代理.
这是git --config -l的输出
core.symlinks=false
core.autocrlf=true
color.diff=auto
color.status=auto
color.branch=auto
color.interactive=true
pack.packsizelimit=2g
help.format=html
http.sslcainfo=C:/Program Files/Git/bin/curl-ca-bundle.crt
sendemail.smtpserver=/bin/msmtp.exe
diff.astextplain.textconv=astextplain
user.name=Peter Wilkinson
user.email=someemail@gmail.com
github.user=ProggerPete
github.token=shouldprobablykeepthissecret
http.proxy=http://somedomain\someuser:somepass@10.167.116.142:80
https.proxy=http://somedomain\someuser:somepass@10.167.116.142:80
Run Code Online (Sandbox Code Playgroud)
我也跑了
export https_proxy=http://somedomain\someuser:somepass@10.167.116.142:80
export http_proxy=http://somedomain\someuser:somepass@10.167.116.142:80
set https_proxy=http://somedomain\someuser:somepass@10.167.116.142:80
set http_proxy=http://somedomain\someuser:somepass@10.167.116.142:80
Run Code Online (Sandbox Code Playgroud)
然后我尝试克隆并获取.
$ git clone https://ProggerPete@github.com/project/JavaScript-Maven-Plugin.git
Cloning into JavaScript-Maven-Plugin...
Password:
error: The requested URL returned error: 407 while accessing https://ProggerPet
@github.com/project/JavaScript-Maven-Plugin.git/info/refs
fatal: HTTP request …Run Code Online (Sandbox Code Playgroud) 我正在测试SSH连接以检查git中的RSA密钥.我正在代理服务器上工作.我正在使用Windows 7并安装了msysGit-fullinstall-1.7.3.1-preview20101002.现在在msys.exe窗口中,我已经通过命令'git config --global http.proxy http:// host:port ' 设置了代理.之后我尝试了命令'ssh git@github.com'.这给了我像'ssh:github.com这样的错误:没有与name相关的地址'
我该怎么办?