Raphael Rafatpanah Raphael Rafatpanah - 2 years ago 186
Git Question

git push not working after using CloudFlare reverse proxy

I recently started using CloudFlare (reverse proxy) with my DigitalOcean Droplet (root access server) where I had set up

git push

Of course,
git push
no longer works and returns this error:

ssh: connect to host example.com port 22: Operation timed out

This is most likely because
is trying to access a repo on CloudFlare's servers instead of my DigitalOcean server.

What is the best way to restore
git push

Answer Source

You'll need to update your remote's URL to either use the raw IP, or add a DNS A record in the CloudFlare panel like raw.example.com with the CloudFlare orange cloud thing disabled (so it resolves directly to your host). Then update your git remote setting:

git remote set-url origin [email protected]:foo/bar.git


git remote set-url origin [email protected]:foo/bar.git
Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download