You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
If the server does not respond with a Git HTTP smart service, the Git client will try to fall back to the simpler _Dumb_ HTTP protocol.
The Dumb protocol expects the bare Git repository to be served like normal files from the web server.
The beauty of Dumb HTTP is the simplicity of setting it up.
Basically, all you have to do is put a bare Git repository under your HTTP document root and set up a specific `post-update` hook, and you're done (See <<ch08-customizing-git#_git_hooks>>).
At that point, anyone who can access the web server under which you put the repository can also clone your repository.
To allow read access to your repository over HTTP, do something like this:
The `post-update` hook that comes with Git by default runs the appropriate command (`git update-server-info`) to make HTTP fetching and cloning work properly.
This command is run when you push to this repository (over SSH perhaps); then, other people can clone via something like:
I think instead of installing that hook the code block should look like this:
$ cd /var/www/htdocs/
$ git clone --bare /path/to/git_project gitproject.git
$ cd gitproject.git
$ git config receive.updateServerInfo true
The advantage is, that one can also set this option globally with git config --global or even --system, which is nice because it not necessary anymore to handle that hook for each repo individually.
The text was updated successfully, but these errors were encountered:
progit2/book/04-git-server/sections/protocols.asc
Lines 87 to 109 in d9acee5
I think instead of installing that hook the code block should look like this:
The advantage is, that one can also set this option globally with
git config --global
or even--system
, which is nice because it not necessary anymore to handle that hook for each repo individually.The text was updated successfully, but these errors were encountered: