I need an application to be able to fetch from a git repository but not push to it, so, that's the read-only part. That could easily be done with git daemon.
On top of that, I need access to said repository to be password-protected, including for reading it. So before any fetching can happen, the application will need to authenticate.
Is it doable? with git daemon? something else? http + auth maybe?
HTTP authentication will not protect the pack being transmitted over the wire, so if you are worried about eavesdroppers HTTP authentication will not suffice. Also, git is much more efficient using the git protocol than the HTTP protocol. git-daemon, however, does not do authentication for you.
Probably the best solution is to use gitosis which will allow you to protect the repository using ssh--cryptographically strong authentication, and confidentiality over the wire--and control access to the repository as well (e.g., have some users read-write and some users read-only). This will use the efficient git protocol over your ssh connection.
If you are willing to outsource this, github is perhaps the best approach. They have plans at different price points to meet many needs.
The easiest way is to setup HTTP authentication on top of gitweb. See there.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With