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

String interpolation warning should not appear for SSH key files


    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: Minor Minor
    • None
    • Jenkins 2.319.3
      Credentials binding plugin 1.27.1

      When I do something like this:

      withCredentials([sshUserPrivateKey(credentialsId: 'foo', keyFileVariable: 'SSH_KEYFILE')]) {
        withEnv(["GIT_SSH_COMMAND=ssh -i ${SSH_KEYFILE}"]) {
          // a step that requires GIT_SSH_COMMAND to be set

      I get a warning that a secret as passed to withEnv using string interpolation. That’s not true: the contents of the key file are secret, but the thing I passed to withEnv—its name—is not.

            Unassigned Unassigned
            haw777 Christopher Head
            0 Vote for this issue
            1 Start watching this issue