Skip to content

Commit e8dcdd6

Browse files
committed
🚧 Enables GithubEnterprise for get_auth_token in github
Signed-off-by: Guyzmo <[email protected]>
1 parent 5424773 commit e8dcdd6

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

git_repo/services/ext/github.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -312,7 +312,10 @@ def request_fetch(self, user, repo, request, pull=False, force=False):
312312
@classmethod
313313
def get_auth_token(cls, login, password, prompt=None):
314314
import platform
315-
gh = github3.GitHub()
315+
if self.fqdn != GITHUB_COM_FQDN:
316+
gh = github3.GitHubEnterprise()
317+
else:
318+
gh = github3.GitHub()
316319
gh.login(login, password, two_factor_callback=lambda: prompt('2FA code> '))
317320
try:
318321
auth = gh.authorize(login, password,

0 commit comments

Comments
 (0)