Git http推送失败

时间:2012-12-13 20:42:42

标签: git push

我正在努力使这项工作,但它不起作用。

当我推送到服务器时,我通常没有问题,但现在我继续这样做:

git push origin master
Password for 'https://JZ0258213@111.23.15.321':
Fetching remote heads...
refs/
refs/tags/
refs/heads/
updating 'refs/heads/master'
from 0000000000000000000000000000000000000000
to   1c51a98a88f51fa3fe9ab527a6413f117fade432
sending 1468 objects
PUT 55113af6418f7w77c9a87b3b470c53a64e62e314 failed, aborting (22/403)
Updating remote server info
UNLOCK HTTP error 400
fatal: git-http-push failed

当我尝试从服务器克隆文件或当我尝试使用任何其他命令时,它工作正常,它只是'push'命令无法正常工作。

感谢。

2 个答案:

答案 0 :(得分:1)

我找到了解决方案,我只需要使用'git gc',当我再次按下它时,它可以工作。

答案 1 :(得分:0)

httpd用户需要对所有repo文件的写访问权。 最好的选择是将所有文件chown给httpd用户。