一切都运行良好,直到有一天,当我尝试从 Azure Dev Ops 提取存储库时,出现以下错误:
exec-cmd.c:243 trace: resolved executable dir: C:/Artur-Work/Git/mingw64/libexec/git-core
http.c:937 == Info: Couldn't find host dev.azure.com in the .netrc file; using defaults
http.c:937 == Info: Trying 10.95.163.194:8092...
http.c:937 == Info: connect to 10.95.163.194 port 8092 from 0.0.0.0 port 51891 failed: Timed out
http.c:937 == Info: Failed to connect to 10.95.163.194 port 8092 after 21065 ms: Could not connect to server
http.c:937 == Info: closing connection #0
fatal: unable to access 'https://dev.azure.com/xxx/xxx/_git/xxxx/': Failed to connect to 10.95.163.194 port 8092 after 21065 ms: Could not connect to server
我的问题是从哪里挑选的
10.95.163.194:8092
?是否存储在某处?因为该服务器实际上与 Azure Dev Ops 无关。在第二台计算机上,git克隆/推/拉工作得很好,没有尝试连接10.95.163.194
端口8092
,相同的互联网连接。
Git 配置为在您的计算机上使用 HTTP 代理。有多个地方可能配置了代理,包括:
您可以通过运行
git config --show-origin http.proxy
或检查存储库的 .gitconfig
目录或主目录中的 .git
文件来进行检查。
如果已定义,您可以使用
取消设置git config --global --unset http.proxy
git config --unset http.proxy
取决于设置的具体定义位置。
您还可以定义一个或两个
HTTP_PROXY
或 HTTPS_PROXY
环境变量。如果是这样,您可能需要取消这些设置。