git 报错Failed to connect to 127.0.0.1 port 1071

When using the git command checkout, the error is reported as the question.

This is an error caused by setting up a dynamic proxy.

The solution is as follows (execute in sequence, because there may be dynamic agents set up in multiple places):

  • git command mode
    Use git command to query dynamic proxy
git config --global http.proxy

git config --global https.proxy

If there is a return value, use the following command to cancel the proxy

git config --global --unset http.proxy
git config --global --unset http.proxy
  • git configuration file

Open c:\Users\当前用户the .gitconfigfile in the directory (the file is hidden by default). Delete the line about proxy inside

  • Environment variable

Open the environment variables, view the user variables and system variables, and delete the http_proxy inside (it may not be the name, but the value is 127.0.0.1:1071, or there is proxy), and delete this line.

Guess you like

Origin blog.csdn.net/iningwei/article/details/113657571