有没有办法对 Git 服务器使用 Windows 身份验证(Active Directory)?

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/4329740/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-09-09 07:49:06  来源:igfitidea点击:

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

windowsgitactive-directorymsysgit

提问by Pat O

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.

我找到了有关如何在 Windows 服务器上安装 Git 并使用 SSH(例如 CopSSH)进行身份验证的文章。我对此感到有些惊讶,因为我记得读到不应将 Windows 机器用于共享 Git 存储库(对不起,我不记得我在哪里读到的)。我的问题是我可以将 Git 设置为使用 Windows 身份验证而不是 SSH 吗?这对我来说管理起来会容易得多。由于机器将在我的“空闲时间”由我管理,因此越简单越好。

回答by Luke

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

您可以简单地将共享文件夹用作域内的 git 存储库,并与域用户一起管理它。

c:/> git clone \myserver\repository\myfolder

回答by Zain Rizvi

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

微软官方支持 Git Credential Manager for Windows 使用 Windows 身份验证向 git 验证你自己。

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

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

回答by faken

You could use Redmineto 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.

您可以使用Redmine控制用户对 Git 存储库的访问。反过来,Redmine 本身支持使用 Active Directory 进行身份验证。因此,您的 Git 服务器具有 Active Directory 身份验证。我们使用这个设置没有问题。

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.

如果您不想使用Redmine,请备注一下。在我看来,Redmine 是最好的开源项目管理应用程序,即使您不需要 AD 身份验证,它也确实值得使用。

回答by sdorra

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

您可以使用scm-manager,它有一个活动目录插件。

回答by Monstieur

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

您还可以通过 HTTPS 使用 IIS 托管存储库,然后使用 Windows 用户凭据保护每个项目子文件夹。

回答by Zain Rizvi

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

您可以将 Windows 凭据存储用于 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 :)

它将您的 Git 凭据保存在您 PC 的 Windows 凭据存储中,将其安全保存在安全的位置。而且它真的很容易使用:)

回答by B Keenan

Gitlab Enterpriseclaims 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.

Gitlab Enterprise声称支持 Active Directory。我还没有演示它,但我正在考虑将它作为一个选项,因为我们迁移我们的组织希望有 AD 支持的 svn 服务器。