2012-02-11 104 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