Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Unable to push a git repo via HTTP

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
like image 648
hytriutucx Avatar asked Oct 09 '22 17:10

hytriutucx


1 Answers

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)
like image 156
VonC Avatar answered Oct 11 '22 07:10

VonC