jenkinsci / jenkinsci/gerrit-trigger-plugin
[JENKINS-72542] Auth fail for methods 'publickey' since plugin version 2.39.4
- Dominant language
- Java
- Stars
- 226
- Forks
- 289
- PR merge metrics
- No merged PRs in 30d
Description
Gerrit version 2.16.8
2024-01-11 11:55:49.568+0000 [id=49] SEVERE c.s.t.g.g.GerritConnection#connect: Could not connect to Gerrit server! Host: xxx.yyy.lan Port: 29418
2024-01-11 11:55:49.568+0000 [id=49] SEVERE c.s.t.g.g.GerritConnection#connect: Proxy:
2024-01-11 11:55:49.568+0000 [id=49] SEVERE c.s.t.g.g.GerritConnection#connect: User: jenkins KeyFile: id_rsa
2024-01-11 11:55:49.568+0000 [id=49] SEVERE c.s.t.g.g.GerritConnection#connect: IOException:
com.jcraft.jsch.JSchException: Auth fail for methods 'publickey'
at com.jcraft.jsch.Session.connect(Session.java:521)
at com.sonymobile.tools.gerrit.gerritevents.ssh.SshConnectionImpl.connect(SshConnectionImpl.java:196)
Caused: com.sonymobile.tools.gerrit.gerritevents.ssh.SshException
at com.sonymobile.tools.gerrit.gerritevents.ssh.SshConnectionImpl.connect(SshConnectionImpl.java:200)
at com.sonymobile.tools.gerrit.gerritevents.ssh.SshConnectionFactory.getConnection(SshConnectionFactory.java:140)
at com.sonymobile.tools.gerrit.gerritevents.ssh.SshConnectionFactory.getConnection(SshConnectionFactory.java:117)
at com.sonymobile.tools.gerrit.gerritevents.GerritConnection.connect(GerritConnection.java:498)
at com.sonymobile.tools.gerrit.gerritevents.GerritConnection.run(GerritConnection.java:404)
After plugin downgrade to 2.39.3 it is working again
---
Originally reported by engy, imported from: Auth fail for methods 'publickey' since plugin version 2.39.4
rsandell
Raw content of original issue
Gerrit version 2.16.8
2024-01-11 11:55:49.568+0000 [id=49] SEVERE c.s.t.g.g.GerritConnection#connect: Could not connect to Gerrit server! Host: xxx.yyy.lan Port: 29418
2024-01-11 11:55:49.568+0000 [id=49] SEVERE c.s.t.g.g.GerritConnection#connect: Proxy:
2024-01-11 11:55:49.568+0000 [id=49] SEVERE c.s.t.g.g.GerritConnection#connect: User: jenkins KeyFile: id_rsa
2024-01-11 11:55:49.568+0000 [id=49] SEVERE c.s.t.g.g.GerritConnection#connect: IOException:
com.jcraft.jsch.JSchException: Auth fail for methods 'publickey'
at com.jcraft.jsch.Session.connect(Session.java:521)
at com.sonymobile.tools.gerrit.gerritevents.ssh.SshConnectionImpl.connect(SshConnectionImpl.java:196)
Caused: com.sonymobile.tools.gerrit.gerritevents.ssh.SshException
at com.sonymobile.tools.gerrit.gerritevents.ssh.SshConnectionImpl.connect(SshConnectionImpl.java:200)
at com.sonymobile.tools.gerrit.gerritevents.ssh.SshConnectionFactory.getConnection(SshConnectionFactory.java:140)
at com.sonymobile.tools.gerrit.gerritevents.ssh.SshConnectionFactory.getConnection(SshConnectionFactory.java:117)
at com.sonymobile.tools.gerrit.gerritevents.GerritConnection.connect(GerritConnection.java:498)
at com.sonymobile.tools.gerrit.gerritevents.GerritConnection.run(GerritConnection.java:404)
After plugin downgrade to 2.39.3 it is working again
1 attachment
- [screenshot-1.png](https://issues.jenkins.io/secure/attachment/62004/screenshot-1.png)
> 
Contributor guide
Research direction
Start in SshConnectionImpl.connect, especially around the reported failure at line 196, then trace SshConnectionFactory.getConnection and GerritConnection.connect. Compare behavior between plugin versions 2.39.3 and 2.39.4 using the reported Gerrit 2.16.8 setup; done means public-key authentication works again without the reported JSchException.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java
- Domain
- authentication, backend
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100