Warning: Identity file /c/Users/D35N/Downloads/GitHubProjeckt/Automation/GitHubProjeckt/newharbortestkey not accessible: No such file or directory. Host key verification failed. Build step 'Execute shell' marked build as failure
I have tried to set ssh connectivity in my jenkins server for this remote server incredentials and ssh plugins but using my key i am getting an error cant connect to the server.
when i run the script from local it works fine and my ssh connection gets established properly using SSH key.
jenkins server is also integrated or installed on my kuberenets cluster which is my remote server in this case and bash script should execute on this kuberenets cluster.
i generated ley for jenkins in remote server and using this key for ssh plugin setup but i am getting cant connect to the server error everytime.
--
You received this message because you are subscribed to the Google Groups "Jenkins Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-use...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-users/366717fe-86d5-4f83-8990-7584308b3a36o%40googlegroups.com.
* Create an SSH key pair (public/private) Ran the command “ssh-keygen -t rsa -C "Jenkins agent key" -f "jenkinsAgent_rsa" “
* Create an SSH credential in the Jenkins machine and put the private key there Created the credentials and put jenkinsAgent_rsa into it.
* Create an SSH agent see https://github.com/jenkinsci/ssh-slaves-plugin/blob/master/doc/CONFIGURE.md#configure-launch-agents-via-ssh – This is creating a node which I didn’t do before – so I created the node and selected the credential with the private key. The verification strategy slect is non-verifying.
* Select the SSH credential created before as credentials
* Chose the verification strategy that you want, see the documentation, if you have problems start with the "Non verifying Verification Strategy" you can change it later
* Add the public key on ~/.ssh/authorized_keys This was done
I tried to relaunch the node and got the following:
SSH Connection failed with IOException: "Key exchange was not finished, connection is closed.", retrying in 15 seconds. There are 1 more retries left. [07/23/20 11:03:50] [SSH] WARNING: The SSH key for this host does not match the key required in the connection configuration. Connections will be denied until the host key matches the configuration key. Key exchange was not finished, connection is closed. ERROR: Connection is not established! java.lang.IllegalStateException: Connection is not established! at com.trilead.ssh2.Connection.getRemainingAuthMethods(Connection.java:988) at com.cloudbees.jenkins.plugins.sshcredentials.impl.TrileadSSHPublicKeyAuthenticator.getRemainingAuthMethods(TrileadSSHPublicKeyAuthenticator.java:88) at com.cloudbees.jenkins.plugins.sshcredentials.impl.TrileadSSHPublicKeyAuthenticator.canAuthenticate(TrileadSSHPublicKeyAuthenticator.java:80) at com.cloudbees.jenkins.plugins.sshcredentials.SSHAuthenticator.newInstance(SSHAuthenticator.java:218) at com.cloudbees.jenkins.plugins.sshcredentials.SSHAuthenticator.newInstance(SSHAuthenticator.java:171) at hudson.plugins.sshslaves.SSHLauncher.openConnection(SSHLauncher.java:863) at hudson.plugins.sshslaves.SSHLauncher$1.call(SSHLauncher.java:435) at hudson.plugins.sshslaves.SSHLauncher$1.call(SSHLauncher.java:422) at java.util.concurrent.FutureTask.run(FutureTask.java:266) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) at java.lang.Thread.run(Thread.java:748) [07/23/20 11:04:05] Launch failed - cleaning up connection [07/23/20 11:04:05] [SSH] Connection closed.
* Add the public key on ~/.ssh/authorized_keys This was done
--
[07/23/20 11:03:50] [SSH] WARNING: The SSH key for this host does not match the key required in the connection configuration. Connections will be denied until the host key matches the configuration key.
--
You received this message because you are subscribed to the Google Groups "Jenkins Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-use...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-users/f4d173ead92529d5c37ed189a58d7cbf9b200ad4.camel%40opentext.com.
--
You received this message because you are subscribed to the Google Groups "Jenkins Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-use...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-users/5344dbc1bc6d8366f985b477483c8a78e9f383f4.camel%40opentext.com.
--
You received this message because you are subscribed to the Google Groups "Jenkins Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-use...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-users/092a6094-5f76-40bf-b2f6-0accc42e6f57o%40googlegroups.com.
thanks , can you please suggest how can i change it to non verifying one?
To unsubscribe from this group and stop receiving emails from it, send an email to jenkins...@googlegroups.com.
To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-use...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-users/63ed9be4-f2d4-4d32-9157-c90e18d2420fo%40googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-users/63ed9be4-f2d4-4d32-9157-c90e18d2420fo%40googlegroups.com.
Started by user Sakshi Rathore Running as SYSTEM Building in workspace /var/lib/jenkins/workspace/test9 No credentials specified Cloning the remote Git repository Cloning repository https://github.com/sakshirathorebgw/GitHubProjeckt.git > git init /var/lib/jenkins/workspace/test9 # timeout=10 Fetching upstream changes from https://github.com/sakshirathorebgw/GitHubProjeckt.git > git --version # timeout=10 > git fetch --tags --progress -- https://github.com/sakshirathorebgw/GitHubProjeckt.git +refs/heads/*:refs/remotes/origin/* # timeout=10 > git config remote.origin.url https://github.com/sakshirathorebgw/GitHubProjeckt.git # timeout=10 > git config --add remote.origin.fetch +refs/heads/*:refs/remotes/origin/* # timeout=10 > git config remote.origin.url https://github.com/sakshirathorebgw/GitHubProjeckt.git # timeout=10 Fetching upstream changes from https://github.com/sakshirathorebgw/GitHubProjeckt.git > git fetch --tags --progress -- https://github.com/sakshirathorebgw/GitHubProjeckt.git +refs/heads/*:refs/remotes/origin/* # timeout=10 > git rev-parse refs/remotes/origin/master^{commit} # timeout=10 > git rev-parse refs/remotes/origin/origin/master^{commit} # timeout=10 Checking out Revision 5dd43192426415f540b687697f6ef436acf60600 (refs/remotes/origin/master) > git config core.sparsecheckout # timeout=10 > git checkout -f 5dd43192426415f540b687697f6ef436acf60600 # timeout=10 Commit message: "added from server" First time build. Skipping changelog. [test9] $ /bin/sh -xe /tmp/jenkins4883353382832852402.sh + ./piecebypiece.sh ./test2-harbor.pfx is certpath test2-harbor is basename test2-harbor is new secret name for harbor this is password start01 ./test2-harbor.key key file generated ./test2-harbor.crt crt file generated key filename is test2-harbor.key crt filename is test2-harbor.crt address for certificate is : test2-harbor.tank.local core: core.harbor.domain core: test2-harbor.tank.local notary: notary.harbor.domain notary: test2-harbor.tank.local secretName: secretName: test2-harbor check1 /home/ccpuser harbortest-master-gro-a7c3cedfab ccp_kibana_ingress_setup.sh cert_status1.sh check.sh docker harbor harbor_bkp jenkins-cli.jar jenkins-namespace.yaml jenkins-volume.yaml kibana_ingress.yaml new_server_cert.sh newharbortestkey old_server.sh piecebypiece.sh test2-harbor.crt test2-harbor.key test2-harbor.pfx test2-harbor123.crt test2-harbor123.key test2-harbor123.pfx test2-harbor12345.crt test2-harbor12345.key test2-harbor12345.pfx test2-harbor54321.crt test2-harbor54321.key test2-harbor54321.pfx value.yaml value1.yaml further run execute check.sh now namespace is harbor harbor is NOT NULL ./test2-harbor54321.crt test2-harbor54321.crt The certificate of expires on Thu Jun 3 07:54:16 UTC 2021 which is in 302 days from now! WARNING - Expiration date is near! edit properties file and run the job to install the new cert mv: cannot move 'harbor' to 'harbor_bkp/harbor': Directory not empty namespace "harbor" deleted"harbor" has been added to your repositories total 232 drwxr-xr-x 15 ccpuser ccpadmin 4096 Jul 30 11:00 templates drwxr-xr-x 2 ccpuser ccpadmin 4096 Jul 30 11:00 conf drwxr-xr-x 2 ccpuser ccpadmin 4096 Jul 30 11:00 cert -rw-r--r-- 1 ccpuser ccpadmin 24523 Aug 4 14:58 values.yaml -rw-r--r-- 1 ccpuser ccpadmin 561 Aug 4 14:58 Chart.yaml -rw-r--r-- 1 ccpuser ccpadmin 83889 Aug 4 14:58 README.md -rw-r--r-- 1 ccpuser ccpadmin 11357 Aug 4 14:58 LICENSE -rw-r--r-- 1 ccpuser ccpadmin 5418 Aug 4 14:58 test2-harbor54321.pfx -rw-r--r-- 1 ccpuser ccpadmin 7382 Aug 4 14:58 test2-harbor54321.key -rw-r--r-- 1 ccpuser ccpadmin 5465 Aug 4 14:58 test2-harbor54321.crt -rw-r--r-- 1 ccpuser ccpadmin 5418 Aug 4 14:58 test2-harbor12345.pfx -rw-r--r-- 1 ccpuser ccpadmin 7382 Aug 4 14:58 test2-harbor12345.key -rw-r--r-- 1 ccpuser ccpadmin 5465 Aug 4 14:58 test2-harbor12345.crt -rw-r--r-- 1 ccpuser ccpadmin 5418 Aug 4 14:58 test2-harbor123.pfx -rw-r--r-- 1 ccpuser ccpadmin 7382 Aug 4 14:58 test2-harbor123.key -rw-r--r-- 1 ccpuser ccpadmin 5465 Aug 4 14:58 test2-harbor123.crt -rw-r--r-- 1 ccpuser ccpadmin 5418 Aug 4 14:58 test2-harbor.pfx -rw-r--r-- 1 ccpuser ccpadmin 7382 Aug 4 14:58 test2-harbor.key -rw-r--r-- 1 ccpuser ccpadmin 5465 Aug 4 14:58 test2-harbor.crt namespace/harbor created ./test2-harbor54321.pfx is certpath test2-harbor54321 is basename test2-harbor54321 is new secret name for harbor ./test2-harbor54321.key key file generated ./test2-harbor54321.crt crt file generated key filename is test2-harbor54321.key crt filename is test2-harbor54321.crt core: test2-harbor.tank.local notary: test2-harbor.tank.local secretName: test2-harbor54321 values.yaml is updated secret/test2-harbor54321 createdNAME: harbor LAST DEPLOYED: Tue Aug 4 14:58:39 2020 NAMESPACE: harbor STATUS: deployed REVISION: 1 TEST SUITE: None NOTES: Please wait for several minutes for Harbor deployment to complete. Then you should be able to visit the Harbor portal at https://core.harbor.domain For more details, please visit https://github.com/goharbor/harbor Harbor certificate isntallation done Mail notification sent Build step 'Execute shell' marked build as failure Finished: FAILURE
To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-use...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-users/ec42ce3b-6d97-4415-9a7a-ab7b06e78377o%40googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-users/ec42ce3b-6d97-4415-9a7a-ab7b06e78377o%40googlegroups.com.