I am behind a firewall that allows only HTTP/HTTPS. Although I am able to pull git repos via HTTPS, I am unable to push them via HTTP/HTTPS. Though the repo is hosted on github, which allows this, I get an error. Here is the error that I get:
user@ubuntu:~/crazykdeme/mirrored/news$ git push -u origin master
XML error: not well-formed (invalid token)
error: no DAV locking support on https://github.com/mynick/news.git/
fatal: git-http-push failed
2012: I manage to push just fine to GitHub behind proxy, with an https address.
However, you need a Git 1.6.6+ in order to support the smart-http protocol:
See "Cannot push Git to remote repository with http/https" for more, and "Git push over HTTP not activating remote hooks" for the general idea and advantage of smart http.
To know all the variables you need to setup in order for thyat push to success:
See "Cannot get Http on git to work":
http_proxyhttps_proxyhttp.sslcainfo$HOME/.netrc(or%HOME%/_netrcon Windows)2023: Do not forget that, since Aug. 2021, token-based authentication (for example, personal access, OAuth, SSH Key, or GitHub App installation token) will be required for all authenticated Git operations.
So make sure to use a PAT (Personal Access Token) as password.