-
Bug
-
Resolution: Fixed
-
Major
-
Linux, Jenkins ver. 1.515, Java(TM) SE Runtime Environment (build 1.6.0_37-b06), Git version 1.7.1
I use file based git Repository on local host (/J2EE/home/jenkins/git-repository)
$HOME of user jenkins is /J2EE/home/jenkins and $JENKINS_HOME is /J2EE/home/jenkins/.jenkins
As long as /J2EE/home/jenkins/git-repository was empty, the scm-sync-configuration plug in bailed out because it could not "check out" from there.
Now I tried to help myself by doing "git init " inside /J2EE/home/jenkins/git-repository
Now however the plug in can not commit to that location.
See:
[INFO] Executing: /bin/sh -c cd /J2EE/home/jenkins/.jenkins/scm-sync-configuration/checkoutConfiguration && git add – jobs
[INFO] Working directory: /J2EE/home/jenkins/.jenkins/scm-sync-configuration/checkoutConfiguration
[INFO] Executing: /bin/sh -c cd /J2EE/home/jenkins/.jenkins/scm-sync-configuration/checkoutConfiguration && git status
[INFO] Working directory: /J2EE/home/jenkins/.jenkins/scm-sync-configuration/checkoutConfiguration
[INFO] Executing: /bin/sh -c cd /J2EE/home/jenkins/.jenkins/scm-sync-configuration/checkoutConfiguration && git add – jobs/just-for-fun-ABC
[INFO] Working directory: /J2EE/home/jenkins/.jenkins/scm-sync-configuration/checkoutConfiguration
[INFO] Executing: /bin/sh -c cd /J2EE/home/jenkins/.jenkins/scm-sync-configuration/checkoutConfiguration && git status
[INFO] Working directory: /J2EE/home/jenkins/.jenkins/scm-sync-configuration/checkoutConfiguration
[INFO] Executing: /bin/sh -c cd /J2EE/home/jenkins/.jenkins/scm-sync-configuration/checkoutConfiguration && git add – jobs/just-for-fun-ABC/config.xml
[INFO] Working directory: /J2EE/home/jenkins/.jenkins/scm-sync-configuration/checkoutConfiguration
[INFO] Executing: /bin/sh -c cd /J2EE/home/jenkins/.jenkins/scm-sync-configuration/checkoutConfiguration && git status
[INFO] Working directory: /J2EE/home/jenkins/.jenkins/scm-sync-configuration/checkoutConfiguration
[INFO] Executing: /bin/sh -c cd /J2EE/home/jenkins/.jenkins/scm-sync-configuration/checkoutConfiguration && git status
[INFO] Working directory: /J2EE/home/jenkins/.jenkins/scm-sync-configuration/checkoutConfiguration
[INFO] Executing: /bin/sh -c cd /J2EE/home/jenkins/.jenkins/scm-sync-configuration/checkoutConfiguration && git commit --verbose -F /tmp/maven-scm-1363919153.commit -a
[INFO] Working directory: /J2EE/home/jenkins/.jenkins/scm-sync-configuration/checkoutConfiguration
[INFO] Executing: /bin/sh -c cd /J2EE/home/jenkins/.jenkins/scm-sync-configuration/checkoutConfiguration && git symbolic-ref HEAD
[INFO] Working directory: /J2EE/home/jenkins/.jenkins/scm-sync-configuration/checkoutConfiguration
[INFO] Executing: /bin/sh -c cd /J2EE/home/jenkins/.jenkins/scm-sync-configuration/checkoutConfiguration && git push file:///J2EE/home/jenkins/git-repository master:master
[INFO] Working directory: /J2EE/home/jenkins/.jenkins/scm-sync-configuration/checkoutConfiguration
20.12.2013 14:13:23 hudson.plugins.scm_sync_configuration.SCMManipulator checkinFiles
SCHWERWIEGEND: [checkinFiles] Problem during SCM commit : remote: error: refusing to update checked out branch: refs/heads/masterESC[K
remote: error: By default, updating the current branch in a non-bare repositoryESC[K
remote: error: is denied, because it will make the index and work tree inconsistentESC[K
remote: error: with what you pushed, and will require 'git reset --hard' to matchESC[K
remote: error: the work tree to HEAD.ESC[K
remote: error: ESC[K
remote: error: You can set 'receive.denyCurrentBranch' configuration variable toESC[K
remote: error: 'ignore' or 'warn' in the remote repository to allow pushing intoESC[K
remote: error: its current branch; however, this is not recommended unless youESC[K
remote: error: arranged to update its work tree to match what you pushed in someESC[K
remote: error: other way.ESC[K
remote: error: ESC[K
remote: error: To squelch this message and still keep the default behaviour, setESC[K
remote: error: 'receive.denyCurrentBranch' configuration variable to 'refuse'.ESC[K
To file:///J2EE/home/jenkins/git-repository
! [remote rejected] master -> master (branch is currently checked out)
error: failed to push some refs to 'file:///J2EE/home/jenkins/git-repository'
20.12.2013 14:13:23 hudson.plugins.scm_sync_configuration.ScmSyncConfigurationBusiness processCommitsQueue
SCHWERWIEGEND: Error while processing commit queue : Error while checking in file to scm repository
I assume, this is not a bug in the plugin, but I made something wrong in setting up git.
See attached screenshot, thanx for helping!
Instead of `git init` please try `git init --bare` when initializing your repository