AnacondaRecipes / git-feedstock

A conda-smithy repository for git.
BSD 3-Clause "New" or "Revised" License
0 stars 2 forks source link

[Windows] Git-Credential-Manager-for-Windows is not set by default #4

Open fcollonval opened 6 years ago

fcollonval commented 6 years ago

I really like the git package based on MinGit with busybox. But I had a hard time using it as Git-Credential-Manager-for-Windows is not set as credential.helper by default.

I submitted a feature request on git-for-windows tracker. But it may be worth adding a patch to achieve this on the recipe.

For info: The command to set the helper is

git config credential.helper manager
msarahan commented 6 years ago

Seems fine to me, but I'm not sure about introducing os-specofic behavior. Is there an equivalent on Unix? Should there be? Why should people prefer this over setting up ssh keys? Is it mutually exclusive with ssh keys?

fcollonval commented 6 years ago

Thanks for the feedback.

Seems fine to me, but I'm not sure about introducing os-specific behavior.

I could argue that Git for Windows has and will always be quite different than for unix. This is also reflected in the recipe (the current recipe is essentially two recipes combined thanks to conditions on os).

Is there an equivalent on Unix? Should there be?

Not that I know of. I have no idea if there should be.

Why should people prefer this over setting up ssh keys?

To be realistic, SSH does not play so well with Windows and average Windows users are not keen to learn about it. Actually I think this is one of the reason the credentials helper is developed by Microsoft itself with integration in tools like Visual Studio.

From my selfish perspective, I want to use git for versioning code in a simple way for the user (i.e. hiding the git command machinery). Therefore for remote authentication, anything that looks like a good old user/password dialog appearing only once, will reduce to almost none the questions from Windows user.

Another argument: when installing git for Windows through the official website, the Git-Credential-Manager-for-Windows is set as credential helper by default. Hence an user having both or previous usage with the official installer won't understand why git within conda environment is prompting every time for user and password (the current default behavior) when with the official installer he only needed to enter them once and for all.

An argument against it : the new default behavior will be to show up a modal dialog to get credentials for unknown sources. This may bring trouble on installation without UI (I don't know if git will fallback to command line prompt in such case). User with such scenario will have to turn off modal through configuration (https://github.com/Microsoft/Git-Credential-Manager-for-Windows/blob/master/Docs/Configuration.md#modalprompt).

Is it mutually exclusive with ssh keys?

It is not mutually exclusive.