[JIRA] (JENKINS-42280) Nullpointer on BasicSSHUserPrivateKey passphrase

1 view
Skip to first unread message

bschrijver@schubergphilis.com (JIRA)

unread,
Feb 23, 2017, 8:12:02 AM2/23/17
to jenkinsc...@googlegroups.com
Boris Schrijver created an issue
 
Jenkins / Bug JENKINS-42280
Nullpointer on BasicSSHUserPrivateKey passphrase
Issue Type: Bug Bug
Assignee: Stephen Connolly
Components: ssh-credentials-plugin
Created: 2017/Feb/23 1:11 PM
Priority: Major Major
Reporter: Boris Schrijver

Hi,

When running the same script as mentioned in this ticket: JENKINS-34653, I've got a new NullPointerException.

It looks like the passphrase field in the following file remains null while it actually should contain the password from the credentials.

https://github.com/jenkinsci/ssh-credentials-plugin/blob/384a93e3c188a1b01b1d92279bd5426dabb4e5ee/src/main/java/com/cloudbees/jenkins/plugins/sshcredentials/impl/BasicSSHUserPrivateKey.java

java.lang.NullPointerException: Cannot get property 'plainText' on null object
	at org.codehaus.groovy.runtime.NullObject.getProperty(NullObject.java:60)
	at org.codehaus.groovy.runtime.InvokerHelper.getProperty(InvokerHelper.java:174)
	at org.codehaus.groovy.runtime.callsite.NullCallSite.getProperty(NullCallSite.java:47)
	at org.codehaus.groovy.runtime.callsite.AbstractCallSite.callGetProperty(AbstractCallSite.java:296)
	at Script1.run(Script1.groovy:34)
Add Comment Add Comment
 
This message was sent by Atlassian JIRA (v7.1.7#71011-sha1:2526d7c)
Atlassian logo

bschrijver@schubergphilis.com (JIRA)

unread,
Feb 23, 2017, 8:18:02 AM2/23/17
to jenkinsc...@googlegroups.com
Boris Schrijver updated an issue
Change By: Boris Schrijver
Hi,

When running the same script as mentioned in this ticket: [JENKINS-34653], I've got a new NullPointerException.


It looks like the passphrase field in the following file remains null while it actually should contain the password from the credentials.



https://github.com/jenkinsci/ssh-credentials-plugin/blob/384a93e3c188a1b01b1d92279bd5426dabb4e5ee/src/main/java/com/cloudbees/jenkins/plugins/sshcredentials/impl/BasicSSHUserPrivateKey.java

In the script the variable { {credentials.passphrase}} is null and therefore invoking {{credentials.passphrase.plainText}} will result in a nullpointer.

The question is, why does {{credentials.passphrase}} remain null?

{
code}

java.lang.NullPointerException: Cannot get property 'plainText' on null object
at org.codehaus.groovy.runtime.NullObject.getProperty(NullObject.java:60)
at org.codehaus.groovy.runtime.InvokerHelper.getProperty(InvokerHelper.java:174)
at org.codehaus.groovy.runtime.callsite.NullCallSite.getProperty(NullCallSite.java:47)
at org.codehaus.groovy.runtime.callsite.AbstractCallSite.callGetProperty(AbstractCallSite.java:296)
at Script1.run(Script1.groovy:34)
{code}

docwhat@gerf.org (JIRA)

unread,
Mar 11, 2017, 9:36:04 AM3/11/17
to jenkinsc...@googlegroups.com
Christian Höltje commented on Bug JENKINS-42280
 
Re: Nullpointer on BasicSSHUserPrivateKey passphrase

This is important for automating credentials management via tools like Chef and Puppet.

See https://github.com/chef-cookbooks/jenkins/issues/561 for an example of the impact.

This message was sent by Atlassian JIRA (v7.3.0#73011-sha1:3c73d0e)
Atlassian logo

stephen.alan.connolly@gmail.com (JIRA)

unread,
Oct 31, 2018, 6:00:19 AM10/31/18
to jenkinsc...@googlegroups.com
Stephen Connolly assigned an issue to Unassigned
 

Removing myself as assignee. My current work assignments do not provide sufficient bandwidth to review these issues and in the majority of cases I am only assigned by virtue of being the default assignee. For the credentials-api and scm-api related plugins I have permission to allocate time reviewing changes to these APIs themselves to ensure these APIs remain cohesive, but that can be handled through PR reviews rather than assigning issues in JIRA

Change By: Stephen Connolly
Assignee: Stephen Connolly
This message was sent by Atlassian Jira (v7.11.2#711002-sha1:fdc329d)
Reply all
Reply to author
Forward
0 new messages