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 support for Git Credential Manager Core as a credential helper option #294

Merged
merged 4 commits into from
Jun 23, 2020

Conversation

mjcheetham
Copy link
Member

@mjcheetham mjcheetham commented Jun 12, 2020

Add Git Credential Manager (GCM) Core to the Git for Windows installer.
GCM Core is the cross-platform credential helper that will eventually
replace the exiting GCM for Windows (and GCM for Mac/Linux) helpers.

Move the "Enable Git Credential Manager" option to its own, new page
where you can select between the three options: none, GCM, or GCM Core.

Reusing the same "Use Credential Manager" replay choice key, we can
ensure that existing choices for GCM for Windows are carried forwards to
the new three-option choice. Enabled = GCM for Windows, Disabled = None,
and a new option Core = GCM Core.

Because GCM Core is still in beta we do not make it the default yet; GCM
for Windows is the default.

Signed-off-by: Matthew John Cheetham mjcheetham@outlook.com

image

@mjcheetham mjcheetham requested a review from dscho June 12, 2020 10:46
@PhilipOakley
Copy link
Contributor

Is there a wider justification to be added to the commit - it's worth starting the commit explanation even if it's still wip.

Don't assume everyone is familiar with the abbreviations, or the potential benefits, and don't forget to include any documentation improvement that will guide the users to use the benefits...

@dscho
Copy link
Member

dscho commented Jun 12, 2020

I agree that there could be a justification (it's easy to see: Git Credential Manager for Windows is limited to Windows, whereas the Core version can replace that totally stale Java version of the Git Credential Manager).

Also, could you make this a radio button choice between GCM Windows, GCM Core and "leave unconfigured", moving it to a new page?

@mjcheetham
Copy link
Member Author

Hi @PhilipOakley, sorry for not being more descriptive with this change. It is indeed a work-in-progress, and was directed at @dscho for some initial comments which we also had offline - I realise this lack of context for others on GitHub is not a good thing. I hoped creating the PR as draft would also help indicate as such.

The benefits are that we plan to deprecate the existing Git Credential Manager for Windows and replace it with Git Credential Manager Core, the cross-platform replacement which will receive more support, fixes and features in the future.

I wanted to get Git Credential Manager Core into the Git for Windows installer as an experimental option at first to help provide a limited rollout of the component that is yet to see wide-spread testing.

@dscho I agree that a separate page for selecting a credential helper ("None/unset", "GCM for Windows", or "GCM Core [experimental]") would probably be better. We should also be able to reuse the existing stored preference for "Use Credential Manager" and extend it to include a "core" value.

@dscho dscho changed the base branch from master to main June 17, 2020 08:07
@mjcheetham mjcheetham marked this pull request as ready for review June 22, 2020 17:43
@mjcheetham mjcheetham changed the title WIP Add support for GCM Core as an experimental option Add support for Git Credential Manager Core as a credential helper option Jun 22, 2020
Copy link
Member

@dscho dscho left a comment

Choose a reason for hiding this comment

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

Just a couple minor suggestions. Please let me know if you agree.

installer/install.iss Show resolved Hide resolved
mingw-w64-git-credential-manager-core/PKGBUILD Outdated Show resolved Hide resolved
mingw-w64-git-credential-manager-core/PKGBUILD Outdated Show resolved Hide resolved
please.sh Show resolved Hide resolved
Add a new package for Git Credential Manager (GCM) Core, the
cross-platform eventual replacement for Git Credential Manager
for Windows.

Signed-off-by: Matthew John Cheetham <mjcheetham@outlook.com>
Update please.sh to deploy the new GCM Core package.

Signed-off-by: Matthew John Cheetham <mjcheetham@outlook.com>
Add Git Credential Manager (GCM) Core to the Git for Windows installer.

Move the "Enable Git Credential Manager" option to its own, new page
where you can select between the three options: none, GCM, or GCM Core.

Reusing the same "Use Credential Manager" replay choice key, we can
ensure that existing choices for GCM for Windows are carried forwards to
the new three-option choice. Enabled = GCM for Windows, Disabled = None,
and a new option Core = GCM Core.

Because GCM Core is still in beta we do not make it the default yet; GCM
for Windows is the default.

Signed-off-by: Matthew John Cheetham <mjcheetham@outlook.com>
Remove the unused OpenGCMHomepage function from the installation script.

Signed-off-by: Matthew John Cheetham <mjcheetham@outlook.com>
@dscho
Copy link
Member

dscho commented Jun 23, 2020

Awesome job, @mjcheetham!

@yyjdelete
Copy link

@mjcheetham @dscho
Question: Seems the option is not shown when Only show new options is enabled in new released git-for-windows 2.28.0-x64?

@rimrul
Copy link
Member

rimrul commented Jul 29, 2020

Yes. That's due to the way Only show new options works. It doesn't realise there's a new answer for the credential manager. It only realises that we previously asked you about the credential manager.

@nkjackzhang
Copy link

When i use git help credential-manager-core, i get error like Can't find file C:/Program Files/Git/mingw64/share/doc/git-doc/git-credential-manager-core.html, is it missing?

@rimrul
Copy link
Member

rimrul commented Jul 30, 2020

I don't think such a help file exists.

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.

6 participants