I believe credentials are assigned an identifier at the time the credential is created in Jenkins, then that identifier is used in the job definition. That makes the credential definition specific to the Jenkins instance where the credential was created.
You might attempt to copy the credentials from the file system of the source Jenkins server to the file system of the target Jenkins server. That might preserve the credential identifier into the target Jenkins server. I've not yet learned a highly effective way to extract jobs which use credentials on one machine and then define those same jobs using the Jenkins CLI or other calls on another machine. Maybe others have learned a good technique and are willing to share it with us. Mark Waite On Wed, Oct 21, 2015 at 7:59 AM Jirong Hu <[email protected]> wrote: > We just did a copy (of the job directories) from DEV server to PROD > server, but found all git credentials are missing in jobs in the target > server. Any idea why and how to fix it? We copied about 50 jobs. > > Thanks > Jirong > > -- > You received this message because you are subscribed to the Google Groups > "Jenkins Users" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to [email protected]. > To view this discussion on the web visit > https://groups.google.com/d/msgid/jenkinsci-users/127f4b45-a69e-4abf-a87c-bc5722d24056%40googlegroups.com > <https://groups.google.com/d/msgid/jenkinsci-users/127f4b45-a69e-4abf-a87c-bc5722d24056%40googlegroups.com?utm_medium=email&utm_source=footer> > . > For more options, visit https://groups.google.com/d/optout. > -- You received this message because you are subscribed to the Google Groups "Jenkins Users" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-users/CAO49JtGypgMaCPcbHZpD0VRHffXGPeQFnYbhcRd1J1p1pzoLiw%40mail.gmail.com. For more options, visit https://groups.google.com/d/optout.
