Gerrit Trigger Password Troubles

52 views
Skip to first unread message

Justin Fehr

unread,
Oct 7, 2015, 5:10:03 PM10/7/15
to Jenkins Users
Hi all. Disclaimer, Im new to Jenkins. Anyways I am trying to set up Jenkins with the Gerrit Trigger to run builds as patch sets are pushed to our gerrit server.  I go through the settings and set up the connection and test the connection. the connection is successful. Then I save my settings which takes me back to the gerrit trigger page. When I open the settings I just saved and test the connection it fails. When I re-enter the ssh keyfile password and test again it works. From my testing I can conclude that the problem is from saving it seems to be changing or corrupting the password. Similarly I am seeing the same issue with the rest api http password. I have tried this with 1.631 and 1.632 current core releases, as well as 1.625 of the LTS version. My gerrit trigger version is 2.16.0 any help would be greatly appreciated. Thanks.

Justin Fehr

unread,
Oct 8, 2015, 5:49:03 PM10/8/15
to Jenkins Users
I downgraded to 1.609 and am still seeing the issue. I am wondering if this is a bug that has been around for a while, my guess (although I can't confirm) is that it does not affect users who already have it set up. only users trying to change or set a password for the first time.

Björn Pedersen

unread,
Oct 10, 2015, 2:42:44 PM10/10/15
to Jenkins Users
Hi,

yes,this has been around for some version. As it only surfaces if you touch the config for aserver (which happens rather seldom), not many have rmuch trouble with it.

Björn

Justin Fehr

unread,
Oct 13, 2015, 1:24:42 PM10/13/15
to Jenkins Users
Is there a fix or workaround?

Björn Pedersen

unread,
Oct 14, 2015, 4:56:04 AM10/14/15
to Jenkins Users
Reenter correct passwords everytime you touch this form.

Björn Pedersen

unread,
Oct 14, 2015, 5:13:26 AM10/14/15
to Jenkins Users
I took a look at the jelly files:
They use e.g. :

src/main/resources/com/sonyericsson/hudson/plugins/gerrit/trigger/GerritServer/index.jelly:                                            value="${it.config.gerritHttpSecretPassword}"/>
src/main/resources/com/sonyericsson/hudson/plugins/gerrit/trigger/GerritServer/index.jelly:                                    value="${it.config.gerritAuthKeyFileSecretPassword}"

But I could not find any other occurence of gerritHttpSecretPassword/ gerritAuthKeyFileSecretPassword with git grep. 
Unless there is some jelly magic involved, the password fields are always prefilled with some default value.


Björn

Daniel Beck

unread,
Oct 14, 2015, 6:16:38 AM10/14/15
to jenkins...@googlegroups.com

On 14.10.2015, at 11:13, Björn Pedersen <ice...@googlemail.com> wrote:

> But I could not find any other occurence of gerritHttpSecretPassword/ gerritAuthKeyFileSecretPassword with git grep.
> Unless there is some jelly magic involved, the password fields are always prefilled with some default value.

https://github.com/jenkinsci/gerrit-trigger-plugin/blob/2224079b54947ddf8e90284e3ec9a8d0866d5b78/src/main/java/com/sonyericsson/hudson/plugins/gerrit/trigger/config/IGerritHudsonTriggerConfig.java#L319
https://github.com/jenkinsci/gerrit-trigger-plugin/blob/2224079b54947ddf8e90284e3ec9a8d0866d5b78/src/main/java/com/sonyericsson/hudson/plugins/gerrit/trigger/config/IGerritHudsonTriggerConfig.java#L250

The "magic" is translating property access to getter. grep case-insensitively.

Justin Fehr

unread,
Oct 14, 2015, 10:04:55 AM10/14/15
to Jenkins Users
I am confused by this answer, when I enter the passwords and test the connection it works fine, as soon as I save it they are modified and no longer work. How can I get them to be saved correctly?
Reply all
Reply to author
Forward
0 new messages