简体   繁体   中英

Adding SSH site in Jenkins throws exception

I am using Jenkins 2.89.2 installed as Windows Service. When I tried to add SSH Site under configuration, I get an exception

java.lang.NullPointerException
at org.jvnet.hudson.plugins.CredentialsSSHSite.<init>(CredentialsSSHSite.java:73)
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(Unknown Source)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(Unknown Source)
at java.lang.reflect.Constructor.newInstance(Unknown Source)
at org.kohsuke.stapler.RequestImpl.invokeConstructor(RequestImpl.java:529)
at org.kohsuke.stapler.RequestImpl.instantiate(RequestImpl.java:783)
at org.kohsuke.stapler.RequestImpl.access$200(RequestImpl.java:83)
at org.kohsuke.stapler.RequestImpl$TypePair.convertJSON(RequestImpl.java:678)
at org.kohsuke.stapler.RequestImpl.bindJSON(RequestImpl.java:478)
at org.kohsuke.stapler.RequestImpl.bindJSON(RequestImpl.java:474)
at org.kohsuke.stapler.RequestImpl.bindJSONToList(RequestImpl.java:519)
at org.jvnet.hudson.plugins.SSHBuildWrapper$DescriptorImpl.configure(SSHBuildWrapper.java:193)
at jenkins.model.Jenkins.configureDescriptor(Jenkins.java:3706)
at jenkins.model.Jenkins.doConfigSubmit(Jenkins.java:3670)
at java.lang.invoke.MethodHandle.invokeWithArguments(Unknown Source)

Anyone else experienced this error?

It seems to be a known, but not yet fixed bug JENKINS-46172
I've experienced this error when because of errors on page had left unspecified ssh credentials. 在此处输入图片说明

In my case "Credentials" list was empty and "Add" button didn't work.
So I had to go to "Jenkins/Credentials" menu and enter credentials there. It made possible to select credentials from list and ssh host addition went without described error.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM