GIT 拉取时出现奇怪的 IP 地址

问题描述 投票:0回答:1

一切都运行良好,直到有一天,当我尝试从 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 github azure-devops
1个回答
0
投票

Git 配置为在您的计算机上使用 HTTP 代理。有多个地方可能配置了代理,包括:

  • 计算机上的全局 git 配置
  • 本地 git 存储库

您可以通过运行

git config --show-origin http.proxy
或检查存储库的
.gitconfig
目录或主目录中的
.git
文件来进行检查。

如果已定义,您可以使用

取消设置
git config --global --unset http.proxy
git config --unset http.proxy

取决于设置的具体定义位置。

您还可以定义一个或两个

HTTP_PROXY
HTTPS_PROXY
环境变量。如果是这样,您可能需要取消这些设置。

© www.soinside.com 2019 - 2024. All rights reserved.