[JIRA] (JENKINS-35337) Finds credentials but unable to read key: null
Title: Message Title Itai Sanders commented on JENKINS-35337 Re: Finds credentials but unable to read key: null UPDATE: ok, I used the complete ppk file and it works now. Add Comment This message was sent by Atlassian JIRA (v7.1.7#71011-sha1:2526d7c) -- You received this message because you are subscribed to the Google Groups "Jenkins Issues" group. To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-issues+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
[JIRA] (JENKINS-35337) Finds credentials but unable to read key: null
Title: Message Title Itai Sanders edited a comment on JENKINS-35337 Re: Finds credentials but unable to read key: null UPDATE: ok, I used the complete ppk file and it works now. I guess the problem is just in the PEM format. Add Comment This message was sent by Atlassian JIRA (v7.1.7#71011-sha1:2526d7c) -- You received this message because you are subscribed to the Google Groups "Jenkins Issues" group. To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-issues+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
[JIRA] (JENKINS-35337) Finds credentials but unable to read key: null
Title: Message Title Itai Sanders edited a comment on JENKINS-35337 Re: Finds credentials but unable to read key: null I had the same problem (plugin version 1 . 13). I think I got passed it when I enclosed the private key with the opening and closing statement:{code}-BEGIN RSA PRIVATE KEY-AAABARwm...ggrkQs8=-END RSA PRIVATE KEY-{code}but then the error changed to:{code}[ssh-agent] Looking for ssh-agent implementation...[ssh-agent] Java/JNR ssh-agent[ssh-agent] Registered BouncyCastle on the remote agent[ssh-agent] Unable to read key: problem creating RSA private key: java.lang.IllegalArgumentException: failed to construct sequence from byte[]: unexpected end-of-contents markerorg.bouncycastle.openssl.PEMException: problem creating RSA private key: java.lang.IllegalArgumentException: failed to construct sequence from byte[]: unexpected end-of-contents marker at org.bouncycastle.openssl.PEMParser$KeyPairParser.parseObject(Unknown Source) at org.bouncycastle.openssl.PEMParser.readObject(Unknown Source) at jenkins.bouncycastle.api.PEMEncodable.decode(PEMEncodable.java:153) at com.cloudbees.jenkins.plugins.sshagent.jna.JNRRemoteAgent.addIdentity(JNRRemoteAgent.java:79) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:498) at hudson.remoting.RemoteInvocationHandler$RPCRequest.perform(RemoteInvocationHandler.java:887) at hudson.remoting.RemoteInvocationHandler$RPCRequest.call(RemoteInvocationHandler.java:862) at hudson.remoting.RemoteInvocationHandler$RPCRequest.call(RemoteInvocationHandler.java:821) at hudson.remoting.UserRequest.perform(UserRequest.java:153) at hudson.remoting.UserRequest.perform(UserRequest.java:50) at hudson.remoting.Request$2.run(Request.java:332) at hudson.remoting.InterceptingExecutorService$1.call(InterceptingExecutorService.java:68) at java.util.concurrent.FutureTask.run(FutureTask.java:266) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) at java.lang.Thread.run(Thread.java:745)Caused by: org.bouncycastle.openssl.PEMException: problem creating RSA private key: java.lang.IllegalArgumentException: failed to construct sequence from byte[]: unexpected end-of-contents marker at org.bouncycastle.openssl.PEMParser$RSAKeyPairParser.parse(Unknown Source) ... 19 moreCaused by: java.lang.IllegalArgumentException: failed to construct sequence from byte[]: unexpected end-of-contents marker at org.bouncycastle.asn1.ASN1Sequence.getInstance(Unknown Source) ... 20 more[ssh-agent] Started.{code}needless to say that the {{sh 'ssh user@host'}} inside the {{sshagent}} scope fails. Add Comment
[JIRA] (JENKINS-35337) Finds credentials but unable to read key: null
Title: Message Title Itai Sanders commented on JENKINS-35337 Re: Finds credentials but unable to read key: null I had the same problem. I think I got passed it when I enclosed the private key with the opening and closing statement: -BEGIN RSA PRIVATE KEY- AAABARwm ...ggrkQs8= -END RSA PRIVATE KEY- but then the error changed to: [ssh-agent] Looking for ssh-agent implementation... [ssh-agent] Java/JNR ssh-agent [ssh-agent] Registered BouncyCastle on the remote agent [ssh-agent] Unable to read key: problem creating RSA private key: java.lang.IllegalArgumentException: failed to construct sequence from byte[]: unexpected end-of-contents marker org.bouncycastle.openssl.PEMException: problem creating RSA private key: java.lang.IllegalArgumentException: failed to construct sequence from byte[]: unexpected end-of-contents marker at org.bouncycastle.openssl.PEMParser$KeyPairParser.parseObject(Unknown Source) at org.bouncycastle.openssl.PEMParser.readObject(Unknown Source) at jenkins.bouncycastle.api.PEMEncodable.decode(PEMEncodable.java:153) at com.cloudbees.jenkins.plugins.sshagent.jna.JNRRemoteAgent.addIdentity(JNRRemoteAgent.java:79) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:498) at hudson.remoting.RemoteInvocationHandler$RPCRequest.perform(RemoteInvocationHandler.java:887) at hudson.remoting.RemoteInvocationHandler$RPCRequest.call(RemoteInvocationHandler.java:862) at hudson.remoting.RemoteInvocationHandler$RPCRequest.call(RemoteInvocationHandler.java:821) at hudson.remoting.UserRequest.perform(UserRequest.java:153) at hudson.remoting.UserRequest.perform(UserRequest.java:50) at hudson.remoting.Request$2.run(Request.java:332) at hudson.remoting.InterceptingExecutorService$1.call(InterceptingExecutorService.java:68) at java.util.concurrent.FutureTask.run(FutureTask.java:266) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) at java.lang.Thread.run(Thread.java:745) Caused by: org.bouncycastle.openssl.PEMException: problem creating RSA private key: java.lang.IllegalArgumentException: failed to construct sequence from byte[]: unexpected end-of-contents marker at org.bouncycastle.openssl.PEMParser$RSAKeyPairParser.parse(Unknown Source) ... 19 more Caused by: java.lang.IllegalArgumentException: failed to construct sequence from byte[]: unexpected end-of-contents marker at org.bouncycastle.asn1.ASN1Sequence.getInstance(Unknown Source) ... 20 more [ssh-agent] Started. needless to say that the sh 'ssh user@host' inside the sshagent scope fails.