How to publish a git repository on http

NILHere is an how-to in order to make a git repository available for

cloning through a simple http server. This method only allow people to

fetch the repository, not to push. I wanted to set-up this to get my

code, I don't plan to have any commit on it from other people at this

time so it's enough.

In a folder publicly available from your http server clone your

repository in bare mode. As explained in

the [https://git-scm.com/book/tr/v2/Git-on-the-Server-The-Protocols](man page):

$ cd /var/www/htdocs/some-path/

$ git clone --bare /path/to/git_project gitproject.git

$ cd gitproject.git

$ git update-server-info

$ mv hooks/post-update.sample hooks/post-update

$ chmod o+x hooks/post-update

Then you will be able to clone the repository with

$ git clone https://your-hostname/some-path/gitproject.git

I've lost time because I did not execute git update-server-info so

the clone wasn't possible.

Proxy Information
Original URL
gemini://perso.pw/blog//articles/23.gmi
Status Code
Success (20)
Meta
text/gemini
Capsule Response Time
204.484242 milliseconds
Gemini-to-HTML Time
0.772065 milliseconds

This content has been proxied by September (3851b).