Raphael Rafatpanah Raphael Rafatpanah - 1 month ago 6
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


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 git@


git remote set-url origin git@raw.example.com:foo/bar.git