5

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
hytriutucx
  • 1,584
  • 6
  • 24
  • 37
  • Here is a similar question, but it is quite deadend http://stackoverflow.com/questions/1307864/git-push-to-github-failing-seems-to-be-trying-to-use-http – hytriutucx Feb 11 '12 at 19:35
  • Do you have the latest version of git? I've gotten odd git errors in the past and the newest version always fixed them. – siannopollo Feb 11 '12 at 20:00
  • @siannopollo: my git version is git version 1.7.5.4 That is quite new, I guess – hytriutucx Feb 12 '12 at 04:51
  • Got this because the url in .git/config was incorrect. Changed the URL to git@git:myreponame and it started working correctly. Useless error message – garryp Aug 09 '16 at 15:52

1 Answers1

4

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_proxy
  • https_proxy
  • http.sslcainfo
  • $HOME/.netrc (or %HOME%/_netrc on Windows)
Community
  • 1
  • 1
VonC
  • 1,129,465
  • 480
  • 4,036
  • 4,755