'ERROR: Could not find credentials entry with ID '${TEST}'
I have a problem with passing credentials to Jenkin's job during the scheduled build with parameters. The parameter is required and it has default value. When I execute the job manually everything works ok, but during scheduled execution when I try to pass different credential than the default, it finishes with fail and message:
ERROR: Could not find credentials entry with ID '${TEST}'
Parameters I passing:
H 5 * * * % TEST=CREDENTIAL_TEST_ID
Credential parameter Binding credentials
Does it possible to use the credentials parameter in scheduled build, or I do something in wrong way?
Solution 1:[1]
I am facing the same issue and found https://issues.jenkins.io/browse/JENKINS-32402. The only "solution" currently seems to be to give user 'Anonymous' permission for 'Configure Job'. This way I was able to workaround this issue, but looking for better solutions.
Solution 2:[2]
In Manage Jenkins -> Configure Global Security, toward the middle of page there's a section called Access Control For Builds. Set the Strategy to Run as SYSTEM.
Solution 3:[3]
Maybe obvious question, but to confirm, are you using build trigger "Build periodically with parameters"?
Additionally, are you trying to to schedule the build with parameter which should read credentials from Jenkins Credentials? - if yes, this could be a problem as credentials passed to build via any plugins, are passed when the build steps are being executed and not on the "parameters" stage.
I assume, when you run project manually, the value provided for "TEST" parameter is identical to the one specified in scheduled run - am I correct?
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|---|
| Solution 1 | mwanck |
| Solution 2 | Chris F |
| Solution 3 | PatrykB |
