Ruben Laguna's blog

Sep 23, 2009 - 1 minute read - code error git github http httpproxy propfind proxy return Uncategorized webdav

git: error pushing via HTTP (return code 22)

If you get a

error: Cannot access URL http://github.com/xxxxxxx/, return code 22

when trying to push changes to a git repository via HTTP.

This is probably because you are using an HTTP proxy to access the repo and that proxy doesn’t support WebDAV HTTP methods (especially PROPFIND). So when git issues a PROPFIND the http proxy answers back with a 500 Internal Server Error or something like that.

It seems that PROPFIND is absolutely required so if you can use git:// directly or use a HTTP proxy which supports PROPFIND. Then I think the only option left is try use CONNECT in the proxy.