How to set up git server WITHOUT ssh auth

Some time ago I stumbled upon an explanation on how to set up git authentication via the web server somehow. That way no ssh key swapping would be needed on client side.
Shame on me, I did neither bookmark its link nor can remember the technique.

I just miss throwing out a username:password combo to give access to some throwaway repositories. When prototyping some VM setups it was the last time I felt this need, snapshots were not an ideal solution.

  • SVN Show Log not working
  • How to setup access control in SVN?
  • SVNKit authentication always fails
  • SVN - how to restrict user access to certain folders?
  • Does SVN allows blanks in paths for svn auth file rules?
  • Authorization for on Android
  • Is it possible to use git just with password-based authorization?

    Another example use case I heard of would be in university, where this approach is way less organisational overhead to set up new accounts for 30 people every semester.
    Imagine collecting ssh keys from a bunch of people that have trouble to just generate an own key pair, not even speaking of the people’s lack of knowledge what a VCS even is or what it is used for.

    Of course, a solution to this would be to just use SVN for version control.
    But is it neccessary to put SVN to use when you can have git?

    To prevent misunderstandings, I have my own server running a working gitolite setup and am perfectly fine with using ssh keys client- and server-wise.

  • Best practices for using Git with Magento?
  • Git - What is the difference between push.default “matching” and “simple”
  • When exactly does git prune objects: why is “git gc” not removing commits?
  • Is “git push --mirror” sufficient for backing up my repository?
  • Modify base branch and rebase all children at once
  • How do I move origin/master to new branch?
  • One Solution collect form web for “How to set up git server WITHOUT ssh auth”

    You can use gitolite with any service able to provide an authentication (so rules out the git protocol which has no authentication).

    My https configuration will call gitolite with the id that the apache server will give to the gitolite script.

    ScriptAlias /hgit/ @H@/sbin/gitolite-shell/
    SetEnv GIT_HTTP_BACKEND "@H@/usr/local/apps/git/libexec/git-core/git-http-backend"
    <Location /hgit>
    Git Baby is a git and github fan, let's start git clone.