问题
Goal: hosting git repository on web server without git program and git deamon (used HTTP as transfer protocol and dump as git protocol - nothing scripts, nothing shell, only GET supported).
I used tutorial from: http://git-scm.com/book/en/Git-Internals-Transfer-Protocols
Steps:
- Create a new git repo.
- Clone as --bare to grepo.git
- call "git update-server-info" in grepo.git (nothing file change!)
- mv hooks/post-commit.sample hooks/post-commit && chmod a+x hooks/post-commit
- call "git clone http:// example.com/grepo.git
On client side got: fatal: http:// example.com/grepo.git/info/refs?service=git-upload-pack not found: did you run git update-server-info on the server?
On server side in request log: [20/Jun/2013:11:45:16 +0200] "GET /grepo.git/info/refs?service=git-upload-pack HTTP/1.1" 404 1385
Why git call any script on server? My git version is 1.8.1.5.
回答1:
You may check repo.git/info/refs permissions to see if it is readable by web server process.
来源:https://stackoverflow.com/questions/17211665/git-update-server-info-nothing-do