- I have a new instance of Jenkins and want to migrate credentials from an old instance.
- CouldBees CloudBees Jenkins Enterprise (CJE)
- CloudBees Operations Center (CJOC)
- Credentials Plugin
You have to copy some files from old instance to the new one and regenerate identity.key.enc file.
cp -R OLD_JENKINS_HOME/secret* JENKINS_HOME cp OLD_JENKINS_HOME/credentials.xml JENKINS_HOME rm JENKINS_HOME/identity.key.enc
This migrates the global scope credentials, in order to migrate folder and user scope credentials, you have to copy credentials.xml files on folders (JENKINS_HOME/jobs/FODER_NAME/credentials.xml) and users (JENKINS_HOME/users/USER_NAME/credentials.xml) to the new place in the new instance.