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

Add explicit PAT authentication mode for the GitHub Provider #236

Merged
merged 3 commits into from
Nov 30, 2020

Conversation

mjcheetham
Copy link
Collaborator

Add an authentication mode to the GitHub provider whereby a Personal Access Token can be returned directly, as generated by a user manually. This mode is always supported on both GitHub.com and GHES, as it should always be possible to create a PAT manually for whatever access is required.

This functionality sort-of already exists, but requires a few things:

  1. The users needs to enable basic auth for GHES, or force override the authentication modes to allow basic auth (GCM_GITHUB_AUTHMODES=basic)
  2. Know to enter their username, and the PAT as the password in a basic auth prompt

We update the WPF-based Windows GUI for GitHub authentication prompts to support the third authentication mode "PAT". There are also make some changes to how the dialog window is sized to scale with the size of the content (mins and maxes included), which may now vary in the extreme from all three auth options, to just one.

image
GitHub.com with OAuth and PAT options

image
GHES with basic and PAT options

image
GHES with the PAT option only

image
A scenario where all options are presented. Currently not possible due to GHES not supporting GCM Core via OAuth, and GitHub.com no longer supporting basic auth - showing to prove the case should this happen such as by user override, or in future development.

Fixes #222

Add an authentication mode to the GitHub provider whereby a Personal
Access Token can be returned directly, as generated by a user manually.

Update the terminal-based UI menu to support the new PAT mode.
Update the WPF-based Windows GUI for GitHub authentication prompts to
support the third authentication mode "PAT".

Also make some changes to how the dialog window is sized to scale with
the size of the content (mins and maxes included), which may now vary in
the extreme from all three auth options, to just one.
@mjcheetham mjcheetham added enhancement New feature or request host:github Specific to the GitHub host provider labels Nov 25, 2020
Correctly quote and escape arguments passed to authentication helpers
via the process arguments.
@mjcheetham mjcheetham marked this pull request as ready for review November 27, 2020 12:34
@jeffhostetler
Copy link

Your new quoting scheme looks good. Thanks.

@mjcheetham mjcheetham merged commit b001322 into git-ecosystem:master Nov 30, 2020
@mjcheetham mjcheetham deleted the githubpatmode branch November 30, 2020 15:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request host:github Specific to the GitHub host provider
Projects
None yet
Development

Successfully merging this pull request may close these issues.

GitHub should ask for "PAT" and not "Password"
2 participants