After performing git push -u origin master
, I got:
fatal: unable to access 'https://github.com/xxxx/xxxx.git': Failed to connect to 127.0.0.1 port 8087: Connection refused
Same error occurred, when I tried to clone other repositories, too.
The Port 8087 doesn't seem to be busy. What could go wrong?
Edit: when I do clone from git://
instead of https://
, it works just fine.
The Git “fatal: Could not read from remote repository” error occurs when there is an issue authenticating with a Git repository. This is common if you have incorrectly set up SSH authentication. To solve this error, make sure your SSH key is in your keychain and you connecting to a repository using the correct URL.
The “Permission denied (publickey). fatal: Could not read from remote repository” error is caused by an issue with the way in which you authenticate with a Git repository. To solve this error, make sure your key is being used on your Git account. If it is not, add your key to Git.
If you have a problem cloning a repository, or using it once it has been created, check the following: Ensure that the user has gone through initial GitCentric login and has the correct username, email, and ssh. This should return a usage message that refers to the config-branch, config-repo, and ls-repo commands.
This happens because a proxy is configured in git.
Since it's https proxy (and not http) git config http.proxy
and git config --global http.proxy
can't help.
git config --global -l
If you have nothing related to https proxy like https_proxy=...
the problem is not here.
If you have something related to https proxy then remove it from the file ~/.gitconfig
and try again
Check your environment variables :
env|grep -i proxy
You should have one or several lines with https_proxy=...
Unset one by one with : unset https_proxy
(or HTTPS_PROXY depending of the name of the variable)
env|grep -i proxy
If it shows nothing you should be good.
Note : This solution can applies to http and https proxy problems. just the variables name changes from https to http
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With