Unable to connect to remote git repository

After execution, git push -u origin masterI received:

fatal: unable to access 'https://github.com/xxxx/xxxx.git': Failed to connect to 127.0.0.1 port 8087: Connection refused

The same error occurred when I tried to clone other repositories as well.

Port 8087 does not seem to be busy. What could go wrong?

Edit: when I make a clone from git://instead https://, it works just fine.

+18
source share
4 answers

This is because the proxy is configured in git.

Since https proxy (not http) git config http.proxyand git config --global http.proxycan not help.

1: see git configuration

git config --global -l

If you have nothing to do with the https proxy, for example https_proxy=..., the problem is missing here.

- - https, ~/.gitconfig

2: ,

:

env|grep -i proxy  

https_proxy=...

: unset https_proxy ( HTTPS_PROXY )

3:

env|grep -i proxy

, .

. - HTTP https. https http

+29

. ( .) ,

  • .gitconfig.

  • . .

  • , ssh key. .

, - 2 .

+4

, git .

git.

git config http.proxy git config --global http.proxy, - git.

0

, , - , , ,

→ → Git

0

Source: https://habr.com/ru/post/1546939/


All Articles