Clé*_*ent 21 git https push http
我在服务器上由apache提供服务的目录中有一个Git存储库.我已经配置了WebDAV,它似乎正在运行.Litmus返回100%的成功.
我可以从远程主机克隆我的存储库,但在尝试推送http或https时,我收到以下错误:
错误:无法访问网址 https://git.example.com/repo/,返回代码22致命:git-http-push failed
任何的想法?
Dee*_*pak 35
编辑.git/config文件的以下部分:
[remote "origin"]
fetch = +refs/heads/*:refs/remotes/origin/*
url = http://git.repository.url/repo.git
Run Code Online (Sandbox Code Playgroud)
至
[remote "origin"]
fetch = +refs/heads/*:refs/remotes/origin/*
url = http://username:password@git.repository.url/repo.git
Run Code Online (Sandbox Code Playgroud)
然后试试git push origin master.
根据需要在配置文件中编辑其他存储库URL的身份验证详细信息,然后推送到所需的分支.
Arr*_*ter 11
强烈建议尽可能不使用WebDAV.如果必须使用HTTP/HTTPS,则建议通过WebDAV 使用git-http-backend CGI脚本.