push发生如下错误
$ git push origin master
Password:
Password:
Fetching remote heads...
refs/
refs/heads/
refs/tags/
updating ' refs/heads/master '
from 0000000000000000000000000000000000000000
to c169dbae92589f44bb734c1ded4a4ec6888f5ac2
Unable to lock remote branch refs/heads/master
Updating remote server info
PUT error: curl result= 22, HTTP code= 403
fatal: git-http-push failed
Password:
Password:
Fetching remote heads...
refs/
refs/heads/
refs/tags/
updating ' refs/heads/master '
from 0000000000000000000000000000000000000000
to c169dbae92589f44bb734c1ded4a4ec6888f5ac2
Unable to lock remote branch refs/heads/master
Updating remote server info
PUT error: curl result= 22, HTTP code= 403
fatal: git-http-push failed
apache错误日志如下:
[Thu Jun
28
14:
53:
24
2012] [error] [client
127.0.
0.1] Could not save .locknull file. [
500, #
0]
[Thu Jun 28 14: 53: 24 2012] [error] [client 127.0. 0.1] ( 2)No such file or directory: Error opening / var/www/html/gitrepo/test.git/refs/heads/.DAV/.locknull for writing [ 500, # 0]
[Thu Jun 28 14: 53: 24 2012] [error] [client 127.0. 0.1] Unable to PUT new contents for /gitrepo/test.git/info/refs. [ 403, # 0]
[Thu Jun 28 14: 53: 24 2012] [error] [client 127.0. 0.1] ( 13)Permission denied: An error occurred while opening a resource. [ 500, # 0]
[Thu Jun 28 14: 53: 24 2012] [error] [client 127.0. 0.1] ( 2)No such file or directory: Error opening / var/www/html/gitrepo/test.git/refs/heads/.DAV/.locknull for writing [ 500, # 0]
[Thu Jun 28 14: 53: 24 2012] [error] [client 127.0. 0.1] Unable to PUT new contents for /gitrepo/test.git/info/refs. [ 403, # 0]
[Thu Jun 28 14: 53: 24 2012] [error] [client 127.0. 0.1] ( 13)Permission denied: An error occurred while opening a resource. [ 500, # 0]
是权限问题,需要将当前用户加入apache用户组中
转载于:https://www.cnblogs.com/heroking2000/archive/2012/06/28/2568407.html