This page is intended to centralize troubleshooting info about the ScmSyncConfiguration plugin configuration.
Lots of configuration types can be encountered, and lots of tricks can be made to help diagnose where the problem is.
First of all ...
Declare a logger for ScmSyncConfiguration plugin
To do so, just go to to the Jenkins System configuration screen, then on the System log section.
Here, create a new Log recorder with the name you want (for example : scm_sync_configuration) with logger hudson.plugins.scm_sync_configuration and log level all.
Save your logger.
Starting from here, everything logged by ScmSyncConfiguration plugin will be recorded in this logger (unfortunately, you cannot get back in the past for diagnosing previous problems : this is the reason why you should ensure you have the logger settled up before doing anything, in case you face problems).
Ensure you can access your Scm repository from Jenkins
There is a simple thing you can do to ensure you're repository is accessible from Jenkins (for various reasons, you could miss things like networks limitations, proxies or firewall).
To be sure you can access your repository, the easiest thing is to configure a temporary Jenkins job which will checkout your repository and echo an "Hello world".
To do this, create a new Freestyle Job and :
- Ensure your job is run on your Jenkins master node (this is important : ScmSyncConfiguration plugin will be ran on the master only !)
- Select your desired scm (svn for example) and configure the same url in the job you would configure in the Jenkins system page
For example :
- Eventually, you will be prompted to enter credentials for your repository (see previous screenshot). If this is the case, enter the credentials you will use and store them in Jenkins.
Once done, you could be able to edit the <JENKINS_HOME>/hudson.scm.<YOUR_SCM> (for example : /var/lib/jenkins/hudson.scm.SubversionSCM.xml) to see if your repository url realm's credentials are there.
- Then create a simple echo "hello world" bash script build step on your job.
- Once done, you should be able to run your job. Verify that Jenkins succeeds to checkout sources located at http://path/to/repository/where/you/want/to/store/your/jenkins/config and then, echo "hello world"
If so, you can freely remove the temporary job.
If everything goes well, go to the Jenkins global configuration screen, and configure ScmSyncConfiguration plugin, it should be ok !
If you use Git then you should use SSH key with default name. It's "id_rsa". SCM Sync does not have option to specify ssh key path. SCM Sync uses .ssh/id_rsa from home directory of the jenkins process owner.