Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Detect github.my-company-server.com as GitHub #241

Merged
merged 3 commits into from
Dec 9, 2020

Conversation

AlexanderLanin
Copy link
Contributor

Detect github[.subdomain].domain.tld as GitHub in order to better support GitHub Enterprise Server.
Prior to this patch a manual configuration of https://github.com/microsoft/Git-Credential-Manager-Core/blob/master/docs/configuration.md#credentialprovider is required.
Closes #219

Unfortunately it's unclear whether this will catch any significant portion of such setups as the urls are not known. But it does seem reasonable and it does catch my use case :-)

Copy link
Collaborator

@mjcheetham mjcheetham left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sorry for the delay here @AlexanderLanin. This seems like a reasonable addition which shouldn't trip up many people, if any (those who have a "github.example.tld" remote that isn't GHES - and then they can always force the generic provider).

Just a few changes regarding string comparison and one extra check in substring string handling (just to be extra safe).

src/shared/GitHub/GitHubHostProvider.cs Outdated Show resolved Hide resolved
src/shared/GitHub/GitHubHostProvider.cs Outdated Show resolved Hide resolved
src/shared/GitHub/GitHubHostProvider.cs Outdated Show resolved Hide resolved
AlexanderLanin and others added 2 commits December 8, 2020 22:17
Co-authored-by: Matthew John Cheetham <mjcheetham@outlook.com>
Uri converts to lowercase.
Copy link
Collaborator

@mjcheetham mjcheetham left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks great, thanks!

@mjcheetham mjcheetham merged commit 5440553 into git-ecosystem:master Dec 9, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Small addition to GitHub enterprise detection
2 participants