Broken Jenkins Credentials

Intro

Hello everyone, after a long time I decided to continue this blog in my spare time so please forgive me if there are rarely updates ๐Ÿ˜ƒ. Then straight to the point, there's problem when I tried to migrate the old Jenkins cluster to the new one. It happened to all the Jenkins job, so I just do debugging like it should and found there's error in the SCM credentials with red error marks.

--- brew the coffee and continue debugging ---

After a while, I found there's an issue on the credentials Secret, so my attempt is to replace the broken Credentials with the right Credentials and here's what I did.

Decrypt Jenkins Credentials

  • Open the Script Console page or access the endpoint https://example-jenkins.com/script, and run this script.
decryptedPassword="{XXX=}" # the {XXX=} is the value of the decrypted password, you can get it from inspect element
println(hudson.util.Secret.fromString(decryptedPassword).getPlainText())
  • Replace the old broken Secret with the new one with the results in the steps above.
ย