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.

  • Changing value of GIT_SSH for tortoiseGit
  • List of authors in git since a given commit
  • Rebase feature branch onto another feature branch
  • Does git ignore capitalization changes in file names?
  • Export and import database on Git push and pull
  • git merge and keep history from original repo
  • 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”

  • Managing Git Users and Passwords
  • My shell prompt looks like this: ➜ ~ git:(master) ✗. How can I get my normal prompt back?
  • git status doesn't show the number of non-pushed commits anymore
  • Pull a commit into another branch exactly (without merging)
  • Visual Git 208 add-in fails to run under Windows 7/Visual Studio 2010
  • how to compress all commit history into one commit?
  • 2 Solutions collect form web for “SCM sync not working”

    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.

    Git Baby is a git and github fan, let's start git clone.