SCM sync not working

I want to sync my Jenkins backup data with git repo. so i follow following steps:

1- I have set git global credential into jenkins GIT option under configuration.

2- Installed scm sync plugin and put configuration parameter in jenkins scm sync configuration tab repo url

3 - save

But i am getting below error:

"Error while adding SCM file : fatal: Not a git repository (or any of the parent directories): .git"


I just ran into this problem. As a preface: this plugin is generally really frustrating to do anything with because of how opaque and unhelpful the error messages are. That said, what the issue actually meant in my case is one of a few things I had to do to correct the issue:

  1. That the access group on Github I had configured for my backup-repo did not have write access.
  2. At one point the repo was misspelled in the config by me (git@github/ instead of git@github:).
  3. Finally, this plugin seems to like restarts quite a bit. After changing a setting, run a Jenkins restart to get new error messages that better assist in diagnosing the problem.

Aside from those, the system log info in hudson.plugins.scm_sync_configuration is particularly helpful, and frequently more telling than the general page errors.

This sequence worked for me with Git:

  1. Install the SCM Sync plugin
  2. Enter the Git Repository URL in Jenkins > Configuration > SCM Sync configuration
  3. Restart Jenkins. At this point the SCM Sync plugin would only commit files after I changed them. All the other unmodified files were not committed to Git.
  4. Remove the Git Repository URL in Jenkins > Configuration > SCM Sync configuration. Click Save.
  5. Put back the Git Repository URL in Jenkins > Configuration > SCM Sync configuration. Click Save.
  6. In a scratch directory, verify that all files are present using:

    git clone
    cd jenkins_config
    find .

Hopefully find will print all your config.xml files.

I recorded the exact steps I took above. I do not know if they are all absolutely necessary (particularly steps 2 and 4). The strategy is to repeatedly restart and remove/add the Git Repository URL until it works.

Need Your Help

ASP.NET Page Fragment

In my requirement I need to add or remove a sub-page or page-fragment (or similar component, I don't know the name, similar to User Control) dynamically.

w3c Mobile checker Using desktop version of page? (responsive wordpress site)

php wordpress mobile responsive-design user-agent

I am using the following function in PHP to detect the user agent and display or hide revolution slider based on whether or not the useragent mobile. The issue I am having is this: