Git没有从git bash连接,但在CONNECT之后在代理的cmd.exe - 503中工作

时间:2016-04-15 14:34:07

标签: windows git bash

当我尝试从git bash连接时,我得到了:

$ /mingw64/bin/git fetch
fatal: unable to access 'https://example.com/repo.git/': Received HTTP code 503 from proxy after CONNECT
$ /mingw64/bin/git version
git version 2.8.1.windows.1

适用于cmd.exe:

"C:\Program Files\Git\mingw64\bin\git.exe" fetch
remote: Counting objects: 24, done.
remote: Compressing objects: 100% (8/8), done.
remote: Total 13 (delta 5), reused 9 (delta 1)
Unpacking objects: 100% (13/13), done.
"C:\Program Files\Git\mingw64\bin\git.exe" version
git version 2.8.1.windows.1

当我从github使用git版本的windows时,它也有效:

$ ~/AppData/Local/GitHub/PortableGit_25d850739bc178b2eb13c3e2a9faafea2f9143c0/cmd/git fetch
remote: Counting objects: 25, done.
remote: Compressing objects: 100% (9/9), done.
remote: Total 13 (delta 6), reused 0 (delta 0)
Unpacking objects: 100% (13/13), done.
$ ~/AppData/Local/GitHub/PortableGit_25d850739bc178b2eb13c3e2a9faafea2f9143c0/cmd/git version
git version 2.7.4.windows.1

我在github https://github.com/git-for-windows/git/issues/732

上创建了问题

1 个答案:

答案 0 :(得分:0)

在从bash中连接时,可能设置了http_proxy环境变量,并且在从cmd运行命令时没有设置它或将其设置为不同的值。使用set命令

检查两个环境