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.

  • SVNKit authentication always fails
  • Authorization for github.com on Android
  • Does SVN allows blanks in paths for svn auth file rules?
  • SVN Show Log not working
  • SVN - how to restrict user access to certain folders?
  • How to setup access control in SVN?
  • 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.

  • How can I remove 'excluded' files from a Git repository?
  • Restrict certain GitHub users to merge branches
  • When should pdf files be tracked in a Git repository and when not
  • Can I push the definition of a remote itself to a remote?
  • gpg failed to sign the data. Failed to write commit object
  • How do i move my current work to a topic 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>
       ...
    </Location>
    
    Git Baby is a git and github fan, let's start git clone.