2012-02-11 102 views
4

我在仅允许HTTP/HTTPS的防火墙后面工作。尽管我可以通过HTTPS来拉取git repos,但我无法通过HTTP/HTTPS推送它们。虽然回购托管在github上,这允许这个,我得到一个错误。这里是我的错误:无法通过HTTP推送git repo

[email protected]:~/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 
+0

这是一个类似的问题,但它是相当deadend http://stackoverflow.com/questions/1307864/git-push-to-github-failing-seems-to-be-trying-to-use-http – hytriutucx 2012-02-11 19:35:05

+0

做你有最新版本的git?过去我得到了奇怪的git错误,最新的版本总是修复它们。 – siannopollo 2012-02-11 20:00:34

+0

@siannopollo:我的git版本是git版本1.7.5.4 这是相当新的,我想 – hytriutucx 2012-02-12 04:51:08

回答

3

我设法推蛮好GitHub的背后代理,使用https地址。

然而,你需要一个Git 1.6.6+,以支持智能http协议:
请参阅“Cannot push Git to remote repository with http/https”的更多,而“Git push over HTTP not activating remote hooks”智能HTTP的总体思路和优势。

要知道你需要设置为了thyat推动成功的所有变量:
请参阅 “Cannot get Http on git to work”:

  • http_proxy
  • https_proxy
  • http.sslcainfo
  • $HOME/.netrc(或%HOME%/_netrc在Windows上)
+2

Merci为您的链接。在.git/config中,我将“url = http://”更改为“url = ssh:// id”。它的工作原理。 – 2012-06-14 08:08:37