无法通过 HTTP 推送 git repo [英] Unable to push a git repo via HTTP
问题描述
我位于只允许 HTTP/HTTPS 的防火墙后面.虽然我可以通过 HTTPS 拉取 git repos,但我无法通过 HTTP/HTTPS 推送它们.尽管 repo 托管在 github 上,这允许这样做,但我收到错误消息.这是我得到的错误:
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
推荐答案
我设法使用 https 地址将很好的推送到 GitHub 背后的代理.
I manage to push just fine to GitHub behind proxy, with an https address.
但是,您需要一个 Git 1.6.6+ 才能支持 smart-http 协议:
请参阅无法使用 http 将 Git 推送到远程存储库/https"了解更多信息,以及Git push over HTTP 不激活远程钩子",了解智能 http 的总体思路和优势.
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.
要了解您需要设置的所有变量,以便 thyat 推向成功:
请参阅无法在 git 上获取 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
(或%HOME%/_netrc
在 Windows 上)
http_proxy
https_proxy
http.sslcainfo
$HOME/.netrc
(or%HOME%/_netrc
on Windows)
这篇关于无法通过 HTTP 推送 git repo的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!