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.

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.

  • NodeJS server side application deployment cosiderations
  • How to use gitlab to test and deploy websites
  • Set subdirectory as website root on Github Pages
  • Lean Node.js + Nginx server infrastructure for a mobile app?
  • Upgrade SonarQube issues
  • Git Rebase master conflicts
  • git / github and web server deployment configuration
  • Can I host my own bare git repo on my remote server?
  • 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.