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

Git Extensions is a great tool but the credential management is very weak #4916

Closed
Bikeman868 opened this issue May 3, 2018 · 56 comments
Closed

Comments

@Bikeman868
Copy link

Everyone uses Git Extensions in our office and some people have to type their username and password every time, some people have to just type their password, and for other people their credentials are remembered. In some cases there is a console window to type into and in other cases it is a popup login box.

Everyone in our office would like Git Extensions to remember their credentials, but nobody can figure out what path you have to take through the install options to get there, or how to take an existing installation and configure it to remember the credentials. Many have tried and all have failed.

In general Git Extensions is a really great tool and we really appreciate the effort that went into creating it, but the area of credential management is very fragmented and confusing. Even a document with steps to configure an existing install to remember credentials would solve this problem.

Thanks.

Do you want to request a feature or report a bug?

What is the current behavior?

If the current behavior is a bug, please provide the steps to reproduce and if possible a minimal demo of the problem.

What is the expected behavior?

Environment you encounter the issue:

  • GitExtensions version:
  • GIT version:
  • OS version:

Did this work in previous version of GitExtensions (which)?

@NickPolyder
Copy link
Contributor

Hello, I know that this is not an answer but it may help you until the problem is properly solved. I usually use ssh keys or tokens to make possible the authentication of the git without using the credential manager.
Check this examples

@RussKie
Copy link
Member

RussKie commented May 3, 2018

Thank you for kind words.

Without knowing under what circumstances you are having troubles it is hard to provide a specific advice. Have you searched for similar issues and possible resolutions? https://github.com/gitextensions/gitextensions/search?q=wincred&type=Issues

There are few things you can do:

@Bikeman868
Copy link
Author

Bikeman868 commented May 4, 2018 via email

@RussKie
Copy link
Member

RussKie commented May 4, 2018

I hear you, unfortunately installation scripts are somewhat an arcane art which the core team could not master to date. We are acutely aware of issues related to the installer, however some are much harder then others.

It is worth noting, some of the installations you may be referring to are in fact 3rd party installers (e.g. git installer, kdiff installer etc), which we don't own, and that are bundled in our complete installer for the convenience. The git installer has a number of configuration items for users to choose.

On the topic of bundling - this is a double edge sword as we found. For example, the git's release cadence is higher then ours, and our users may be installing outdated git versions.
In the future releases we will be unbundling 3rd party components from our installer (#4515), and those components will need to be installed by users themselves.

@Bikeman868
Copy link
Author

Bikeman868 commented May 4, 2018 via email

@Bikeman868
Copy link
Author

I am setting up a new dev environment with a different company and going through all this pain all over again.
You can create the greatest software in the world, but if users can not login/register it is all a complete waste of time.
I really like Git Extensions but accessing a remote repository is a total nightmare.

@RussKie
Copy link
Member

RussKie commented Sep 25, 2018 via email

@Bikeman868
Copy link
Author

Ask anybody who is very familiar with computer technology in general but is not familiar with GitExtensions to try to install it and have it pull/push to a remote repository without asking for credentials each time.

Stand behind the person and watch as they gradually become more and more angry and frustrated until they eventually pick up their computer and throw it out of the window, then go and get really drunk.

The short answer to your question is absolutely everything is lacking. If users can not get past step 1 all of the other cool features of the software are a total waste of everyone's time who has worked on it.

The multitude of options for configuring GitExtensions to talk to a remote repository create thousands of permutations most of which do not work. Finding a configuration that does work is extremely difficult and most of my co-workers have given up trying and just type the password on every remote operation.

Most people do not care which specific flavor of widgit they are using, they just want to version control their files using Git. Spending weeks reading thousands of pages of documentation on dozens of tools, libraries and plugins just to get off the ground is just not feasible for most users.

@Bikeman868
Copy link
Author

After several more hours this evening I got to a point where Git Bash works without prompting for a password, this seems like a good place to start. It works in both the Git Bash shell and also in the Console window within Git Extensions, but the Pull dialog still does not work. You can see all three in this screenshot.
image

@vbjay
Copy link
Contributor

vbjay commented Sep 25, 2018

It's not that hard.
One time key setup. You can copy the files around


image
Either generate a new ssh key or import an existing open ssh key and create a putty key that is the same key.
image


In the repo manage remotes
image

It will automatically load that key and start the putty agent if needed.

I just hit fetch all after closing the putty agent.
image
Look at what started up for me
image

@RussKie
Copy link
Member

RussKie commented Sep 25, 2018

The multitude of options for configuring GitExtensions to talk to a remote repository create thousands of permutations most of which do not work. Finding a configuration that does work is extremely difficult and most of my co-workers have given up trying and just type the password on every remote operation.

Can you please be more specific?

I have spend the whole evening tonight replicating a fresh install experience.

  • I have rolled out a fresh VM with W10
  • I have downloaded and installed GE 2.51.05, it told me to download git, so
  • I have downloaded and installed git 2.19 (I chose OpenSSH and GCM)
  • I have cloned GE repo from https://github.com/gitextensions/gitextensions.git (this took awhile)

Up until this point I have not been asked for any usernames, passwords or any other keys.

  • I've change a file and attempted to push into my fork
  • I got prompted and entered my GH username/password
  • I pushed
  • I pushed again and again without any prompts or challenges

Granted, setting up a SSH key for a remote repo is slightly more involved (typically I simply copy my .ssh folder across), but there are multiple guides available (e.g. the Jay's guide above, github guide, bitbucket guide).

A number of engineers in my team in past few weeks had their laptops rebuilt and they had to completely reinstall their dev environments. I haven't heard a word of complaint from anyone (from a grad to a lead level). All git and GE related installations were most straight forward (compared with other tools, such as VS).

At this point I am afraid I can't see anything wrong or overly complicated in settings up or working with a git repo.

The short answer to your question is absolutely everything is lacking. If users can not get past step 1 all of the other cool features of the software are a total waste of everyone's time who has worked on it.

Sorry, but to me it looks like you had a bad day and came here to vent.
If you have a concrete examples, we are happy to discuss further. If not, I'm going to close this ticket.

@gerhardol
Copy link
Member

If Git works from bsh, it works from GE too.
Make sure you set HOME to the same as Git bash
This is a feature, you can have a different GUI profile compared to cmd profile

image

@vbjay
Copy link
Contributor

vbjay commented Sep 25, 2018

Another thought.

Use chocolatey.
Gitextensions package
You can create a gist that will install all your dev needs.

example

choco upgrade gitextensions -y
choco upgrade p4merge -y
#any other packages

You can also create a package that has your configuration and it depend on the needed packages.

Example package: https://chocolatey.org/packages/EthanBrown.GitExtensionsConfiguration

You can then either alter the gist to alter your git config and/or gitextensions settings file to have whatever settings you desire or have the package start you off with your default config. With the gist, you can control what settings get set on run of the script.

@Bikeman868
Copy link
Author

It is true that I am having a bad day as a result of this but I am not here to vent.
I work with a team of developers each of which said something along the lines of "it can't be that hard, let me figure out how to get it working on my machine and get back to you". Some developers spent a couple of hours, some spent the whole day, but finally nobody was actually able to make it work.

If a whole team of developers tried and not one person succeeded, I think the statement that "Its not that hard" are clearly incorrect. More accurately, it's not that hard if you understand exactly how all of these pieces work and how they fit together.

I think that the walkthrough by @vbjay above goes a long way to solving the problem, so thank you for that.

@vbjay
Copy link
Contributor

vbjay commented Sep 25, 2018

When you go through the installation there are a number of choices to make, but it is impossible to choose the right options because there is no way to know how these choices will affect your user experience.

In response to above: It is your responsibility to learn git and how it works. We expect some understanding of git to use this program. It is not a gui to allow monkeys to create Hamlet.
http://www.vogella.com/tutorials/Git/article.html

Glad the walkthrough helped.

The other point is that you can post a detailed issue and ask for help and read the documentation.

image
http://git-extensions-documentation.readthedocs.io/en/latest/index.html

@NickPolyder
Copy link
Contributor

Hello, I will speak from the point of just a user and my experience with this.
From day 1 that i used GitExtensions it was extremely easy to do everything. (day 1 for me was also meaning that i didnt know how to work git command line either. I learned through git extensions how to work the console commands.) I never had any problem setting up (and believe me i tried every single way of this installer. I have used all the options).
My guides on solving this kinds of things is the documentation pages.
No need to get frustrated over this.
GitExtensions is merely a facade to the real git commands if you having problems with running something through the GitExtensions usually means that something wrong with gitconfig or git related configuration.
Of course there will be cases that the GUI will have a bug or something but this is not a case.

All of the above its my opinion and im not anywhere near related to the main contributor team and the Owners. So please before judge my comment and say anything bad know that.

Thanks.

@Bikeman868
Copy link
Author

From my original post:

In general Git Extensions is a really great tool and we really appreciate the effort that went into creating it, but the area of credential management is very fragmented and confusing. Even a document with steps to configure an existing install to remember credentials would solve this problem.

The walkthrough by @vbjay above is the documentation that I feel was missing. I hope this helps other people to get the most out of GitExtensions.

@vbjay
Copy link
Contributor

vbjay commented Sep 25, 2018 via email

@RussKie
Copy link
Member

RussKie commented Sep 25, 2018

Thank you, Jay.

I work with a team of developers each of which said something along the lines of "it can't be that hard, let me figure out how to get it working on my machine and get back to you". Some developers spent a couple of hours, some spent the whole day, but finally nobody was actually able to make it work.

If a whole team of developers tried and not one person succeeded, I think the statement that "Its not that hard" are clearly incorrect. More accurately, it's not that hard if you understand exactly how all of these pieces work and how they fit together.

If I may suggest, the problem should be address by educating engineers. Brownbags and tech walk throughs typically help. That's how we teach and upskill our engineers.
If engineers do not know how to use tools they use, they need to learn those first.

Is there something outstanding on this issue you would like addressed, or can we close it?

@seltzdesign
Copy link

I agree that GitExtensions is a giant mess and has the usability of a potato. Everything is so overly complicated and has way too many options and dialogs.

If you want to see how GIT could work for most people, just take a look at Abstract (its basically Github for Sketch files). Its so simple and works with almost 0 explanation.

We here are also Developers and it took us half a day to get GitExtensions up and running without having to enter a password. The whole SSH, putty, etc. thing is just ridicolous.

@seltzdesign

This comment has been minimized.

@drewnoakes
Copy link
Member

@seltzdesign what did you hope to achieve with your comments here?

We are volunteers and our output is proportional to our motivation. Taking a 💩 on the project isn't helpful.

If I assume you were trying to help, then perhaps you could open specific issues with things we could address, or even roll up your sleeves and help improve things.

Each git client has its own strengths and weaknesses. If GE is not for you, that's fine.

The whole SSH, putty, etc. thing is just ridicolous

I use OpenSSH and never have to enter a password anywhere. I don't know if other maintainers use Putty. It sounds like there is something we can do to improve things in this space. It'd be useful if you explained more about what makes it "ridicolous".

@vbjay
Copy link
Contributor

vbjay commented Dec 13, 2018

I use putty. I generated a key with a password so no one but me can push as me. Once I enter the key password, I can push as long as the the key agent is running. I can kill it when I choose. I stored the key in google drive so that it travels wherever I go. Yes. I know you're not supposed to share it like that. I do have a good password on it.

Putty makes it dirt simple.

Generate key.
image

Use this to set up the github or whatever user account
image

Tell remote to use ssh key

image

If the key agent isn't running it will start and ask you for your password for the key if the key has a password.

I for one think we did a great job with the putty side of things. The only thing I want to do is embed chocolatey and get rid of the putty binaries so that user installed version stays current. I want people to install our program and our program to run chocolatey to make sure putty and git are installed. I want it to tell them there are upgrades for the packages we follow. I want portable users to be able to extract our program and it deploys git and putty using chocolatey to a dependencies folder where GE is located. That is my goal for the future of GE.

@drewnoakes
Copy link
Member

Thanks @vbjay, I've not seen the Putty workflow before.

For completeness, here's the OpenSSH approach. It's all command line (and from memory, so I'm missing output):

$ ssh-keygen
$ cat ~/.ssh/id_rsa_pub

Copy the text there and paste it into GitHub/Bitbucket/Azure DevOps/wherever.

ssh-keygen asks some questions, but you can safely press enter for all questions and accept the defaults (unless you want a passphrase).

I create a different key pair per device. That way if I lose a device, I can just pull that one key from online services and carry on with other devices.

Setting up SSH might be annoying for new git users, but it's a one time thing per machine and things are completely seemless afterwards.

@weitzhandler
Copy link

@Mike-EEE
Thanks for making it so easy. Was pulling my hair out!

@kevintupper
Copy link

I was having trouble with the same issue when pushing through Visual Studio 2019. Just so it's clear re: Mike-EEE's message. After signing in in with your normal user / password in Visual Studio, you have to go edit the credential in windows for git/visual studio and use your personal access token.

@MCOfficer
Copy link

MCOfficer commented Feb 11, 2020

Wanted to share my solution as well. I have 2 keys: My RSA key is for (manual) SSH connections, while I use my ed25519 key for GitLab.

I had set Git Extensions to use the ed25519 key according to vbjay's instructions, but kept getting Errors like

FATAL ERROR: No supported authentication methods available (server sent: publickey)

I checked that both Keys were loaded into pageant (they were) and that the Remote was using the correct one. Still no dice.

Eventually i noticed that the problem was not even within Git Extensions: PuTTY's "Default Settings" were configured to use the RSA key, preventing Git Extensions from using the other one.
If you have issues, also check for that!

@RussKie
Copy link
Member

RussKie commented Feb 12, 2020 via email

@maphew
Copy link

maphew commented Feb 14, 2020

@Mike-EEE's solution of manually adding a Windows Credential worked for me. Type: generic, username and password, no 2FA.

@maphew
Copy link

maphew commented Mar 10, 2020

Caveat: the generic Windows Credential method seems to only allow one username per url so for multiple identities one needs to make the internet or network address unique.

For example, a work identity: git:https://github.com/myorg
Personal identity: git:https://github.com/ (everything but the above)

image

@maphew
Copy link

maphew commented Mar 27, 2020

The Windows Credential solution from a couple weeks ago doesn't quite work as described. A credential needs to be added for every organization or repo, meaning you can't have a generic git:https:/github.com fallback as it looks like the shortest domain name is matched first and overrides any longer ones.

@AraHaan
Copy link

AraHaan commented Apr 26, 2020

Mine was simply deleting them especially the one for github for visual studio there and having the prompt come back up, entering the username and password (the token), then if it fails manually enter the same thing again and then it should work.

@seanke
Copy link

seanke commented May 5, 2020

I needed to remove Visual Studio from here https://github.com/settings/applications

@erlange
Copy link

erlange commented May 7, 2020

What's worked for me:

  • signed out of Github from within Visual Studio
  • deleted all Github related in the Credential Manager.
  • opened Visual Studio again without signing in to Github, opened the solution and pushed changes.
  • Visual Studio automatically prompted me the Github login screen and the problem was fixed.

@sanmai-NL
Copy link

git credential-cache exit

worked for me.

@dannyc84
Copy link

dannyc84 commented Jun 4, 2020

What's worked for me:

  • signed out of Github from within Visual Studio
  • deleted all Github related in the Credential Manager.
  • opened Visual Studio again without signing in to Github, opened the solution and pushed changes.
  • Visual Studio automatically prompted me the Github login screen and the problem was fixed.

It's not the best solution, but It works, thanks.

@addod19
Copy link

addod19 commented Jun 11, 2020

Unfortunately for me, I am using ubuntu so I can't find a solution for this

@gramster
Copy link

gramster commented Jul 7, 2020

Using the Gihub desktop app also seems to work without needing a PAT.

@ncarandini
Copy link

Deleting all Windows Credentials related to GitHub (Visual studio, VS Code, ...) and signing again from VS Code solved for me.

@clemsontiger
Copy link

Anyone else dislike credential manager? my git uses my network credentials, which we have to change periodically so now I have to delete every git entry in credential manager every time my password changes. credential manager also scrolls back to top every time I remove one, so scroll back down every time. we have lots of repo's, so this is painstaking.

I used to not have to do this, git extensions used to prompt me for new credentials when it couldn't authenticate. Can gitextensions go back to prompting for new credentials when it encounters an authentication issue?

@pmiossec
Copy link
Member

pmiossec commented Jun 3, 2021

I used to not have to do this, git extensions used to prompt me for new credentials when it couldn't authenticate. Can gitextensions go back to prompting for new credentials when it encounters an authentication issue?

For me, that's not gitextensions that handle this but the git credential manager. A lot of things could be the reason of the behavior change and my knowledge is limited on this part but could it be a change introduced by the new Git-Credential-Manager-Core (that replaced Git-Credential-Manager)?

Note: maybe that needs opening another issue to not pollute this one...

@clemsontiger
Copy link

For me, that's not gitextensions that handle this but the git credential manager. A lot of things could be the reason of the behavior change and my knowledge is limited on this part but could it be a change introduced by the new Git-Credential-Manager-Core (that replaced Git-Credential-Manager)?

Note: maybe that needs opening another issue to not pollute this one...

Yeah, have no idea on that... I did try out a different git gui and it had the same issue, but it actually has it's own authentication section that looks like it simply pulls from Credential Manager. It allowed me to more quickly identify and remove repo credentials then Windows' own Credential Manager, so I used it. Not great, but better than what I was having to do. Now I will have to do this all over again the next time my password changes. Sigh.

@dhazell
Copy link

dhazell commented Jun 8, 2021

I found using a URL like
git@github.com:my-account/my-repo.git
instead of
https://github.com/my-account/my-repo
meant that I was no longer challenged for credentials each time

@dcuffee
Copy link

dcuffee commented Dec 12, 2021

I have been having the same issues and came here for a clear answer. But was immediately frustrated with comments like "it's very straight forward" and other comments to the op saying he was just here to vent. Its like wow is that how we treat fellow developers these days. You come to a forum for help and you get that type of response. Also who wants to go read a ton of documentation just to get something installed. If its that complex then the developer might think about making a tool a bit more "straight forward".

@gerhardol
Copy link
Member

For https: authentication, the easiest is to use the Git Credenitial Manager Core that comes with Git-for-Windows:
https://github.com/GitCredentialManager/git-credential-manager#windows
(A previous version of GCM was removed from Git distribution in 2.33.1).
The downside of GCM is that expired keys are not notified in a good way, so periodically expired passwords require a manual update.

For ssh authentication most Git servers have their own descriptions, a few links on the GCM page:
https://github.com/GitCredentialManager/git-credential-manager#current-status

@maphew
Copy link

maphew commented Dec 14, 2021

What seems to be working best for me now is to use http and edit the remote url to include the username of the account I wish to use in front of the domain name: https://UserName@domain.com. Works for me with Github and an older on-premise Gitlab.

https://maphew@github.com/devops/geo/sample.git
http://Matt.Wilkie@gitlab.example.com/devops/geo/sample.git

image

@Binarus
Copy link

Binarus commented Dec 17, 2021

At first, thank you very much for Git Extensions! I already had taken a look at it several years ago and now are coming back to it again. I can say that it has greatly evolved in every respect. Great job ...

I believe that everybody who uses repositories via HTTP(S) could read the documentation which explains the Git Credential Manager. Furthermore, if somebody puts a minimal effort in own research, he will inevitably stumble across Git Credential Manager and its friends. Put short, somebody who refuses to read at least the most important part of documentation and who isn't able to do minimal research probably shouldn't be called a developer.

Some more problems arise when it comes to SSH.

In the newest (at the time of writing) version of the famous (and excellent - thanks again folks) Git Book, we find the following statement on page 337:

If you use the SSH transport for connecting to remotes, it’s possible for you to have a key without a passphrase, which allows you to securely transfer data without typing in your username and password.

This statement is the only thing in that excellent book which IMHO is dangerous and misleading. Not every person who tries to learn Git is into security, and the advice to have an SSH key without a passphrase is more than questionable. The opposite is true: Always put a passphrase which is as strong as possible onto your SSH keys. This really needs to be clarified.

Coming back to the actual issue: IMHO the problem is that every software for Windows that deals with SSH keys is using the code, libraries or tools from the putty universe. Unfortunately, Git Extensions also does this. Putty, as likeable as it was at the beginning (I have used it for several years in the 2000s), has upset me several times for two reasons:

  1. Putty does not support the native OpenSSH key format, claiming that its own format is more secure and better. This is a no-go. With Putty's format, you even can't decide how many rounds of operation should be necessary to unlock the key. In contrast, OpenSSH offers appropriate parameters. In that sense, it is extremely annoying when you have to convert your OpenSSH keys to the Putty format, which IMHO is less secure, regardless of what the Putty developer claims.

This alone already made me stop using Putty a long time ago and use Cygwin's ssh instead.

  1. To add to the problem, puttygen is not able to convert OpenSSH keys reliably. More often than not, when importing an OpenSSH key, I just got an error message saying the key could not be decrypted due to a wrong passphrase or such. This was complete nonsense because OpenSSH definitely and in every case could decrypt the same key with the same passphrase, in Linux (different variants) as well as in Cygwin. I am not ready to take the time to investigate this further; obviously, puttygen gets problems when the passphrase of an OpenSSH key contains German umlauts and all kinds of special characters and you put the passphrase into the respective text box by pasting it from the clipboard.

Even people who are ready to accept Putty's own key format (which I don't) will freak out at this point after having lost several hours unsuccessfully trying to convert the OpenSSH key their admin gave to them into the Putty format.

Without these two problems, SSH would be a no-brainer in Git Extensions. The integration has been done very well, and even coping with pageant is very easy. In other words, IMHO the integration is exemplary, and again, somebody who doesn't get it within an hour or so probably isn't a developer. Man, even the dialog boxes during the installation provide the choice of which SSH to use, telling clearly about each choice's consequences.

But the good integration and all the explanations and help can't mitigate that Putty itself is flawed. Therefore, we are using an external ssh program (Cygwin's ssh), and this is the point where a bit more of documentation would be good, at least a few hints regarding ssh-agent and a link to its documentation, or other (Non-Cygwin) SSH implementations, like the native one from Microsoft. It is a real pain having to enter the SSH passphrase each time you fetch, push or pull, but most Windows users probably are not aware that there is a thing like ssh-agent even under Windows (and their admins or managers justifiably won't allow them to use SSH keys without passphrases).

Furthermore, there is an extremely nasty bug in Git Extensions who has cost us some time yesterday, and I can imagine that some of the people who have complained above have been hit by it. I'll eventually open a separate bug report if I find out how to do that :-)

Finally:

@drewnoakes

I use OpenSSH and never have to enter a password anywhere.

Could you please shortly elaborate on this, especially how you manage to do this in Windows and with a passphrase on every key?

@drewnoakes
Copy link
Member

I use OpenSSH and never have to enter a password anywhere.

Could you please shortly elaborate on this, especially how you manage to do this in Windows and with a passphrase on every key?

I don't use a passphrase so perhaps I'm not feeling the pain point you are.

@Binarus
Copy link

Binarus commented Dec 17, 2021

@drewnoakes That explains it :-) Thanks for the fast reply.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests