sshagent step doesn't error if the credentials named do not exist

XMLWordPrintable

    • Type: Bug
    • Resolution: Duplicate
    • Priority: Minor
    • Component/s: ssh-agent-plugin
    • None

      In my Pipeline script, I name credentials for the sshagent step, but when those credentials do not exist, no error happens.

      node {
        sshagent(credentials: ['some-nonexistent-id']) {
          sh 'script-which-needs-ssh-credentials.sh'
        }
      }
      

      I would have expected a typed exception (e.g. CredentialsUnavailableException) to be thrown, instead the closure happily continues and invokes the script which required the credentials

            Assignee:
            Unassigned
            Reporter:
            R. Tyler Croy
            Votes:
            1 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: