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

Treat gist as generic for credential helper #19009

Merged
merged 2 commits into from
Jul 23, 2024

Conversation

tidy-dev
Copy link
Contributor

@tidy-dev tidy-dev commented Jul 23, 2024

Closes #19008

Description

Prior to 3.4.2 and use of Git Credential Helper, authentication for gists in the normal flow failed and would fall back on generic auth handling. This meant users were prompted to provide a username and password and if they provided their github username and a PAT they were able push to them. Now, when normal authentication fails we only provide a generic auth error.. additionally with some modifications to endpoint detection we were detecting Gists as "enterprise" endpoints.

This PR looks for gist.github.com and goes ahead and pushes it through the generic auth flow. Thus, the user is prompted for a password on push, if they provide a PAT, it will succeed. (A similar flow to before, but now we provide the Github user name for them). For a better experience, a user can also got to Settings > Advanced, and check "User Git Credential Manager". Upon trying to push, Git Credential Manager will prompt you to sign into GitHub and then will succeed using that for gists.

Screenshots

This video first shows not using Git Credential Manager (the default settings for now). This means a user must still provide a PAT by default. Then, it shows enabling Git Credential Manager which shows using an auth flow with GitHub. No longer needing a PAT.

CleanShot.2024-07-23.at.16.03.25.mp4

Release notes

Notes: [Fixed] Allow pushing to gists.

mxie
mxie previously approved these changes Jul 23, 2024
Copy link
Member

@mxie mxie left a comment

Choose a reason for hiding this comment

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

Looks good as is. My only concern is whether or not this would affect folks using gists on GHES. This isn't a blocker though. :shipit:

Copy link
Member

@mxie mxie left a comment

Choose a reason for hiding this comment

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

LGTM!

@tidy-dev tidy-dev merged commit 026e711 into development Jul 23, 2024
7 checks passed
@tidy-dev tidy-dev deleted the treat-gists-as-generic branch July 23, 2024 22:26
Copy link

@Akram205033 Akram205033 left a comment

Choose a reason for hiding this comment

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

19009

Copy link

@Akram205033 Akram205033 left a comment

Choose a reason for hiding this comment

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

app/src/lib/endpoint-capabilities.ts
share_2024-09-02_00_45_02_681 jpeg_2024-09-02_00_45_02
Uploading 1724927855703.jpg…

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.

Github Desktop login to github gist fails
3 participants