How to make Egit remember password and username?

后端 未结 6 1334
独厮守ぢ
独厮守ぢ 2020-12-08 20:42

I\'m working onn a project in Eclipse hosted on Github. Everytime I want to push, a dialog pops up asking for username and password. Anybody know how to save these so I don\

相关标签:
6条回答
  • 2020-12-08 20:50

    Secure Storage is your direct provider of credentials.

    So, go to:

    • Window->Preferences->General->Network
    • Change Provider to "Direct"

    This should really be the default since Secure Storage is the default provider in Eclipse.

    You can also change the git preferences to not pop up confirmation dialogs and the overall result will be a very fast workflow

    0 讨论(0)
  • 2020-12-08 20:57

    I had different problem. My credentials where saved permanently and I couldn't delete nor change them. Everytime I had Auth Fail from git and maybe You got same problem but in your case it prompts again. Maybe it will help You or others. I went to Preferences -> General -> Security -> Secure storage and in Contents tab deleted "Default Secure Storage" and restarted Eclipse. Then eGit asked me for password again and successfully saved it in storage.

    0 讨论(0)
  • 2020-12-08 20:58

    You could use ssh url for your repo, and add your ssh public and private key to EGit.

    Or you can activate a credential helper, in order to git to record your credentials.

    0 讨论(0)
  • 2020-12-08 21:01

    This can happen if the saved password in secure storage doesn't match with the typed one. Here's how you can fix it:

    1. From Eclipse toolbar navigate to Window > Preferences > Security > Secure Storage > Contents Tab > [Default Secure Storage] > GIT > "whatever github url"

    2. Select the url and delete the current user.

    3. Eclipse will ask for a restart. Do it.

    4. Push new changes and this time egit will prompt to save credentials in secure storage which was removed from the previous step.

    0 讨论(0)
  • 2020-12-08 21:03

    Struggled with this for a while too:

    1. Go to the Git Perspective -> Expand your Project -> Expand Remotes -> Expand the remote you want to save your password.
    2. Right-click on the Fetch or Push -> Select Change Credentials...
    3. Enter username and password -> Select Ok

    This is the workaround I've found to work. It's a bit manual for each Git project, but it works ^_^.

    0 讨论(0)
  • 2020-12-08 21:08

    That bug (for https URI) can be linked to the (still opened in 2014) bug 355442:

    On every push, egit will ask for password for a secure store.
    The problem is, I never check the option to store the repository username and password in the push dialog.

    (Meaning if you forget to enter the credentials, it won't ask you again for it)

    Reproducible: Always

    Steps to Reproduce:

    1. Push to upstream with the "store username and password in secure store" option unchecked.
    2. push again.

    Getting prompted constantly is pretty annoying but what is more annoying is that I have to uncheck the checkbox every time it shows up.
    If the password is to be stored in the secure storage then the dialog will never prompt again. Wouldn't it make more sense for the checkbox to be unchecked by default?

    So a workaround is to Remote>Fetch, using a "Custom URI" (as Antoine mentioned before), in order to enter again the URI, and enter your credentials there, selecting "Store in Secure Store".
    Subsequent push should work fine, since they are using the same URI you just entered.

    0 讨论(0)
提交回复
热议问题