I am using gerrit as my SCM and have generated ssh keys for ca_nss_jenkins user and added same in gerrit and created jenkins credentials for the same with username and private key. Earlier it was working fine but after restart of the Jenkins server I am getting the issue.
I have tried running the same commands in jenkins server directly and it works fine. But, in Jenkins it is showing the below errors.
Failed to connect to repository : Command "git ls-remote -h ssh://ca_nss_jenkins@gerritrepo HEAD" returned status code 128:
stderr: /tmp/ssh7910025167466427456.sh: line 6: ssh: command not found
fatal: Could not read from remote repository.
Please make sure you have the correct access rights
and the repository exists.