Reputation: 77
When I try to push to a Git repository on Heroku I obtain the following error:
fatal: unable to access 'https://git.heroku.com/xxxxxxxxx.git/': Failed to connect to github.com port 9836: Operation timed out
I also obtain the same error when I try to clone any repository from github.com.
I have tried the following command with no success
git config --global http.proxy github.com:9836
git config --global https.proxy github.com:9836
Upvotes: 0
Views: 2695
Reputation: 136880
These commands tell Git to route all HTTP and HTTPS traffic through GitHub on port 9836:
git config --global http.proxy github.com:9836
git config --global https.proxy github.com:9836
When you try to push to Heroku using HTTPS Git now tries to use GitHub as a proxy. As far as I know, GitHub doesn't operate any public Git proxies, and I'm not sure what their purpose would be.
Removing these settings via
git config --global --unset http.proxy
git config --global --unset https.proxy
or editing your ~/.gitconfig
file manually should resolve your issue pushing to Heroku, assuming you don't actually need a proxy.
Upvotes: 1