Is there a way to use Windows Authentication (Active Directory) for a Git server?
Asked Answered
L

7

20

I have found articles regarding how to install Git on a Windows server and use SSH (such as CopSSH) for authentication. I am a little surprised by this as I remember reading that one should not use a Windows machine for a shared Git repository (sorry don't remember where I read that). My question is can I setup Git to use Windows Authentication rather than SSH? This would be considerably easier for me to administer. Since the machine would be administered by me in my "spare time", easier is better.

Lil answered 1/12, 2010 at 22:20 Comment(1)
I am looking into the "new" Smart Http option with Git.Lil
H
9

You can simply use a shared folder as git repository inside your domain and administer it with your domain users.

c:/> git clone \\myserver\repository\myfolder
Hoatzin answered 1/12, 2010 at 22:30 Comment(5)
I would expect this to offer poor performance, especially over WAN links. Still it would work.Lil
@Pat O You're wrong, this is the setup I have and it has correct performance (7 MB/s on a 100Mbs LAN)Girt
Just done this and it is really slow over WAN, acceptable over LAN. To make it quicker we have to run git gc on regular basis.Caballero
And different users using this repository will have their checkins identified by their AD-user?Shortly
They will have their name based on their local git configurationHoatzin
M
5

Git Credential Manager for Windows is officially supported by Microsoft to use Windows authentication to authenticate yourself to git.

https://github.com/Microsoft/Git-Credential-Manager-for-Windows

Mercola answered 20/11, 2015 at 19:21 Comment(0)
T
2

You could use Redmine to control user access to Git repositories. In turn, Redmine natively supports authentication with Active Directory. Thus, you have Active Directory authentication for your Git server. We use this setup without problems.

Just a remark in case you don't want to use Redmine. Redmine is in my opinion the best open source project management application out there, and it's really worth using even if you don't need the AD authentication.

Trotskyite answered 30/1, 2012 at 21:16 Comment(0)
M
1

You could use scm-manager, which has an active directory plugin.

Mandrel answered 25/3, 2011 at 11:43 Comment(1)
Have you actually used scm-manager? It has some issues. First, the plugins don't seem to behave in a consistent manner. Second, the active directory plugin is a mockup. It doesn't actually provide functionality yet. The ldap plugin is closer to working, but again, it's functionality is not yet implemented or there is a problem with plugin management. Bottom line: it is not yet ready for prime-time unless you feel like fixing someone else's code.Valueless
R
1

You can also host the repo with IIS over HTTPS and then protect each project subfolder with Windows user credentials.

Ribbonfish answered 26/12, 2011 at 6:6 Comment(0)
M
0

You can use Windows Credential Store for Git https://gitcredentialstore.codeplex.com/

It saves your Git credentials in your PC's Windows Credential Store, keeping it safe in a secure location. And it's really easy to use :)

Mercola answered 10/5, 2015 at 20:8 Comment(1)
Project is no longer maintained but it has been replaced with github.com/Microsoft/Git-Credential-Manager-for-WindowsLubric
R
0

Gitlab Enterprise claims to support Active Directory. I haven't demo'd it yet, but I'm considering it as an option as we migrate a svn server that our organization wants to have AD backing it.

Revetment answered 24/1, 2017 at 22:20 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.