无法通过HTTP推送一个git仓库 [英] Unable to push a git repo via HTTP

查看:1428
本文介绍了无法通过HTTP推送一个git仓库的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

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

pre $ user @ ubuntu:〜/ crazykdeme / mirrored / news $ git push -u origin master
XML错误:格式不正确(无效标记)
错误:https://github.com/mynick/news.git/上没有DAV锁定支持
致命:git-http-推送失败


解决方案

我设法将GitHub推得很好代理和https地址。



但是,您需要一个Git 1.6.6+才能支持smart-http协议:

请参阅无法将Git推送到远程存储库,并使用http / https 以获取更多信息,以及 Git推动HTTP不激活远程钩子,以获得智能http的一般想法和优势。



要知道所有需要的变量etup为了促进成功:
请参阅无法让git上的HTTP工作




  • http_proxy $ li $ https_proxy

  • http.sslcainfo
  • code $ $ HOME / .netrc (或%HOME%/ _ netrc 在Windows上)

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

解决方案

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)

这篇关于无法通过HTTP推送一个git仓库的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆