-
Notifications
You must be signed in to change notification settings - Fork 9.5k
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 support for Git Credential Manager (beta-only) #18700
Conversation
We need to run the credential helper in the repo path in case there's local config variables at play
Seems we've got some legit test failures here. One of them is related to our use of '--keep-reduntant-commits' in desktop/app/src/lib/git/cherry-pick.ts Lines 160 to 173 in afb7d2e
This was added in git v2.45.1: git/git@bd2f9fd and I have not dug further into it yet. @tidy-dev do you recall the details around this parameter? The second issue seems to be that our localStorage mock isn't working as intended. Looking into that |
Here is some context: #11717 I haven't tested but I believe if you say had commits: A B C D E on a branch and attempted to cherry-pick B C D to another branch where C would be redundant and thus result in an empty commit, it would stop progression and through and error. Apparently the other option was to skip the commits, we went with keep redundant so that commits didn't just disappear. I.E., User cherry-picks 3 but only 2 show up in target branch. A user might be confused about where it went. Possible third option that I didn't explore.. would be capture that error, and putting in the success banner "Redundant commits were skipped" |
Looks like https://git-scm.com/docs/git-cherry-pick#Documentation/git-cherry-pick.txt---keep-redundant-commits Maybe we can just swap for |
I think the problem is that we can't use either one in conjunction with |
In case there's more than one user per host and trampoline session
We exclude ghe.com so we can request it for GHES and even if it goes away in the future the header will still be there and we'll avoid a redirect
…terprise at the moment
Co-Authored-By: Sergio Padrino <[email protected]>
Prompt to sign in to GitHub hosts in credential helper
Closes #18654
Ref desktop/dugite-native#510
Ref desktop/dugite-native#508
Description
This adds experimental (beta only) support for Git Credential Manager (GCM) which we're now bundling inside of GitHub Desktop's custom Git environment.
When enabling GCM GitHub Desktop will forward all requests for credentials that don't match accounts stored in GitHub Desktop (in essence third party hosts such as Azure Devops, BitBucket, etc).
GCM currently supports Azure DevOps, Azure DevOps Server (formerly Team Foundation Server), Bitbucket, GitHub, GitLab, and generic username + password hosts.
The feature is currently disabled by default and limited to
betadevelopment.Note for reviewers: Hiding whitespace can should help with reviewing changes in git/core.ts.
Screenshots
Release notes
Notes: [New] Option to use Git Credential Manager for repositories hosted outside of GitHub.com