首页 > 解决方案 > How to use windows credentials to authenticate a connection to GitHub Enterprise repositories

问题描述

I created an organization repository on GitHub Enterprise. When I try to work with it, I get a prompt asking for my credentials. The credentials are taken from our Active Directory, so essentially I need to enter the same user and password I use to log into my windows PC. This works well until I change my password.

When I do, I log into my windows PC using the new password. The GitHub Enterprise account also expects the new password. However, the password sent to GitHub is the old one, which was stored in the Windows Credentials Manager.

Obviously I can go and update it after every time I change my password, but I would like to have the credentials sent to GitHub automatically sync with the credentials I use to log into my PC.

Before GitHub Enterprise I used Microsoft Team Foundation Server 2015 and had the same issue there. I resolved it by setting the authentication method from Basic to Integrated. It worked well then, so I tried the same for GitHub Enterprise:

git config --system credential.my.github.domain.authority Integrated

I got the following error:

remote: Anonymous access denied
fatal: Authentication failed for 'https://my.github.domain/MyOrganization/MyRepo.git/'

How should I set this authentication method?

标签: windowsgitactive-directoryntlmgithub-enterprise

解决方案


推荐阅读