Uploaded image for project: 'Jenkins'
  1. Jenkins
  2. JENKINS-20637

SSH Keys are only usable on master, not replicated on slaves

      Adding a SSH key credential enables an executor on the master to use the credential for cloning a Git repository via SSH using the provided credentials. The private key is stored in ~/.ssh of the Jenkins user.

      Running the same job on a SSH slave, the expectation is that this will work as on the master without any further configuration action.

      This is not the case, the job will fail with the following in the log:

      stdout: Cloning into '/home/jenkins/workspace/Begin_Release'...

      stderr: Permission denied, please try again.
      Permission denied, please try again.
      Permission denied (publickey,password).
      fatal: The remote end hung up unexpectedly

      I would expect the SSH key credentials to be transferred to the slave so that they can be used there, too. Instead, the private key has to be installed in the ~/.ssh directory on the slave, too.

            stephenconnolly Stephen Connolly
            f_zschocke Florian Zschocke
            Votes:
            1 Vote for this issue
            Watchers:
            5 Start watching this issue

              Created:
              Updated:
              Resolved: