gerrit-intellij-plugin
gerrit-intellij-plugin copied to clipboard
Gerrit Password dialog keeps popping up
I have a fresh installation of IntelliJ 2017.3 with the Gerrit plugin 1.0.5-146. When I connect to the Gerrit installation, the Gerrit Password dialog keeps popping up, and I have to enter the password several times.
The most detailed message I get is from the Test button in the settings dialog:
Can't login to https://our-local-gerrit-server/: com.urswolfer.gerrit.client.rest.http.HttpStatusException: Request not successful. Message: Unauthorized. Status-Code: 401. Content: Unauthorized.
When I enter my HTTP password into the Gerrit plugin settings, the correct number of masking dots is shown. Then, when I close the settings dialog and open it again, the number of dots is 12, which looks strange. Then, when I press the Test button, the above 401 error message is shown, and when I click on OK, there are suddenly 40 dots in the password field. When I click Test again, the same 401 error is shown.
Still, I know that the password is correct, because when I save the settings now and change to the Gerrit view, the Gerrit changes are shown. Some requests work, others don't. They also fail with a 401 error.
Can you please try to use another password safe on IntelliJ password settings? E.g. you could try Keepass option. There are some known issues around password saving in IntelliJ. See for example: https://youtrack.jetbrains.com/issue/WI-39390#comment=27-2655255
Please let me know if that changes anything.
I met similar situation in Intellij IDEA 2017.1.5. Gerrit Password dialog still keeps popping up even I try Keepass option in Idea system settings. It makes me feel very bad... I think I would crash if this issue continue to annoy me... :( Is there any workaround for this issues? Please... please.... plz
I currently have the KeePass option enabled for IntelliJ. Even when I switch to not using KeePass, I still get the exact same behavior.
Did it ever work before for you @rillig-nm and @yuhui0531? I have changed password related things a few releases (months) ago.
A possible workaround you could try: deactivate "Automatically check for new notifications..." in plugin settings. Please let me know if that changes anything for you.
Many thanks for your quick response. :+1: :100: I will check your workaround as soon as possible. Another possible workaround is that we can refactor GerritSettings.java, add a new way to get the password. It looks ugly, but works.
@uwolfer No, nothing changed for me.
Keepass option + reconfigure the password in the plugin setting worked for us
I think this bug is due to
- gerrit plugin using a deprecated api
- IDEA not correctly supporting KeePass for the deprecated API
See https://youtrack.jetbrains.com/issue/IDEA-200375 for a lot of discussion and https://youtrack.jetbrains.com/issue/IDEA-201204 for the IDEA bug.
In (PhpStorm) 2020.1 this may have worsened to the Gerrit plugin never picking the right password during pushes: https://plugins.jetbrains.com/plugin/7272-gerrit/reviews
Quote:
-wind long It's a nice plugin. But in idea2020.1, it happens to ask me to inpput gerrit password everytime when I open the IDE, I dont know what`s happend
That issue I could resolve by (again) setting the Gerrit password in PhpStorm's settings (and checking it with Test). But for pushes I get a non-descript "rejected by remote". On the host it tells I do not use the correct credentials, but I have no clue where to set them.
Edit: Locally this was a problem with needing to create a new SSH key (ssh-keygen -t rsa -C [email protected]
) and adding that to Gerrit.
The issue that the password request popup does not add the new correct password to the IntelliJ password storage still stands. Though the settings page correctly updates it. So maybe just redirect people to there?
It would be really nice if
[email protected]: Permission denied (publickey).
fatal: Could not read from remote repository.
Would lead to an informative message other than "Push [..] was rejected by remote".
E.g.:
You need to create an SSH key (
ssh-keygen -t rsa -C [email protected]
) and put the.pub
contents in your user settings in Gerrit