无法使用http / https将Git推送到远程存储库

问题描述:

我在服务器上的Apache服务目录中有一个Git存储库。我配置了WebDAV,它似乎正常运行。 Litmus返回100%成功。

I have a Git repository in a directory served by apache on a server. I have configured WebDAV and it seems to be running correctly. Litmus returns 100% success.

我可以从远程主机克隆我的存储库,但是尝试推送http或https时,出现以下错误:

I can clone my repository from a remote host, but when trying to push over http or https, I get the following error:

错误:无法访问URL
https: //git.example.com/repo/ ,返回代码22致命:git-http-push失败

error: Cannot access URL https://git.example.com/repo/, return code 22 fatal: git-http-push failed

任何想法?

如果可能的话,强烈建议不要使用WebDAV。如果您必须使用HTTP / HTTPS,则使用 git-http-backend 推荐使用CGD脚本而不是WebDAV。

It is highly suggested NOT to use WebDAV if possible. If you must use HTTP/HTTPS then usage of the git-http-backend CGI script is recommended over WebDAV.