Kerberos authentication for Git server?

5,225

Solution 1

Author of out-of-date project here; your best bet is to configure SSH to accept kerberos tickets for authentication -- it's straightforward and well documented across the internet.

If that doesn't meet your requirements for whatever reason, you could fall back to using git-http-backend to serve git over http{,s}, and then apache's mod_auth_kerb to authenticate access to that. I've had success with this, but it's fiddly to set up.

(mod_auth_kerb is libapache-mod-auth-kerb on ubuntu, git comes with git-http-backend)

Solution 2

You can make the server user SSH with kerberos (just google for kerberos and SSH) and then git also will work with those kerberos users when you user git+ssh.

Share:
5,225

Related videos on Youtube

Nicolas Raoul
Author by

Nicolas Raoul

I am Nicolas Raoul, IT consultant in Tokyo. Feel free to copy/paste the source code from my StackExchange answers, I release it to the public domain.

Updated on September 18, 2022

Comments

  • Nicolas Raoul
    Nicolas Raoul over 1 year

    I have a Git server, and I want to make it usable by all Kerberos-logged users.

    eg: if a user has a valid Kerberos ticket, she can start pushing to Git without having to provide any username/password.

    Is it even possible to do this with Git?
    All I could find was this old unanswered question on the Git mailing list (with http://), and this project that says it is out-of-date (with git://).

    Server is on Ubuntu 2012.10, but I could move it to Windows Server 2012 if necessary.
    I can dictate which software to use on client-side.