https://wiki.jenkins-ci.org/display/JENKINS/SCM+Sync+configuration+plugin
I have encountered this several times where if you try and change a job name along with any configuration for a job Git will get into a bad state and the SCM will start throwing up errors like:
delete Jobs/OLD_JOB_NAME
The only thing I have found is to fix this is to follow the following steps:
You will have to have admin rights and the ability to restart your jenkins.
- recreate the OLD_JOB_NAME
- change the system configuration scm sync to none.
- restart the jenkins. via your_jenkins_server/restart
-
- change the system configuration scm sync to git.
- Ensure that the configuration is now syncing correctly and you do not have any more errors.
- delete OLD_JOB_NAME again.
- If this still does not work you can try downgrading the plugin and repeating the steps again.
Warning:
You may lose all your job configurations after you reenable the SCM sync so you will have to make a small change to each job name such as changing the description by a single letter.
I have better solution 🙂
As I have deleted so many jobs, so i couldn’t try above steps.
What I did:
1: Login to jenkins master with Jenkins user:
2: go to /var/lib/jenkins/scm-sync-configuration/checkoutConfiguration folder ( may be different in your case )
3: run command git status.
4: Manually add, commit and pushed the changes.
And it’s start working … 🙂
Both solutions work. Yours is much better if you can shell onto the jenkins master node. Mine I came up with because I was unable gain access to master.