-
Bug
-
Resolution: Won't Fix
-
Trivial
-
tomcat 9, jenkins 2.19.1, window 7, java 8, tcnative installed
Following Exception is raised when i run my pipeline script:
{{node {
stage('a') {
sshagent(['tomcat'])
}
}}}
{{[Pipeline] node
Running on master in f:\jenkins\workspace\pipetest
[Pipeline] {
[Pipeline] stage
[Pipeline]
[Pipeline] // stage
[Pipeline] }
[Pipeline] // node
[Pipeline] End of Pipeline
java.lang.RuntimeException: [ssh-agent] Could not find a suitable ssh-agent provider.
at com.cloudbees.jenkins.plugins.sshagent.SSHAgentStepExecution.initRemoteAgent(SSHAgentStepExecution.java:180)
at com.cloudbees.jenkins.plugins.sshagent.SSHAgentStepExecution.start(SSHAgentStepExecution.java:63)
at org.jenkinsci.plugins.workflow.cps.DSL.invokeStep(DSL.java:184)
at org.jenkinsci.plugins.workflow.cps.DSL.invokeMethod(DSL.java:126)}}
At least i was expecting an error from the agent with loading the native lib.
- is duplicated by
-
JENKINS-35336 SSH agent not starting because file not created
-
- Resolved
-
I managed to "install" the native library by adding the path to the dll to the path and then restart Jenkins.
Then it always crashed if my credentials were not in putty's ppk format. Still I cannot execute a plink command. I'm not really sure why. I'd assumed because ppk was the only valid format for me, that I would have to use putty's commands.
Before I had tried mysysgit's ssh command which doesn't seem to have the correct passphrase either.
This job is successful, but the command is not really executed, as if the passphrase is still necessary and just not entered. If I enter the same command in cmd and enter the passphrase the command is actually executed.
Here's my output:
Started by user Admin
Building in workspace D:\jenkins\workspace\freestyletest
[ssh-agent] Looking for ssh-agent implementation...
[ssh-agent] Java/tomcat-native ssh-agent
[ssh-agent] Skipped registering BouncyCastle, not running on a remote agent
[ssh-agent] Started.
[ssh-agent] Using credentials test-ppk
[freestyletest] $ cmd /c call C:\Users\tcbld1\AppData\Local\Temp\2\hudson7374457953271842666.bat
CLINK D:\jenkins\workspace\freestyletest>E:\putty\plink.exe -i C:\Users\tcbld1\.ssh\converted_for_putty_jenkins_id_rsa.ppk target-machine -l testuser touch plink
Passphrase for key "imported-openssh-key":
CLINK D:\jenkins\workspace\freestyletest>exit 0
[ssh-agent] Stopped.
Finished: SUCCESS