Tag Archives: Failed to connect to 127.0.0.1 port xxxxx: Connection refused

[Solved] Ubuntu Error: Failed to connect to 127.0.0.1 port xxxxx: Connection refused

Method 1

Check the agent

git config --global http.proxy
git config --global https.proxy

Cancel if you have one, or change another method if you don’t

git config --global --unset http.proxy
git config --global --unset https.proxy

Method 2

Check whether the system environment uses agents

env|grep -I proxy

The following similar configuration appears

If there is a corresponding agent, cancel it

unset http_proxy
unset https_proxy

Method 3

Manually operate the Ubuntu agent and cancel the agent in the settings.