git fails if no global email/name set, even if set in Jenkins interface
See original GitHub issueI have scm-sync-configuration set to use git.
I set a git user.name and user.email value in the “Git plugin” section of the Jenkins configuration page, but the sync wasn’t working.
When I looked at the Jenkins log file, I saw this:
used by: hudson.plugins.git.GitException: Command "git tag -a -f -m Jenkins Build #1 jenkins-pep8-1" returned status code 128:
stdout:
stderr:
*** Please tell me who you are.
Run
git config --global user.email "you@example.com"
git config --global user.name "Your Name"
When I set these on the command line, sync worked again.
Does scm-sync-configuration use these options from the git plugin? If not, should be documented somewhere. Also, would have been helpful to see this error info in the scm error log.
I was trying to build a new system and restore from an existing repository, so I may have been doing something non-standard here (I manually cloned the repo to $JENKINS_HOME/scm-sync-configuration/checkoutConfiguration
).
Issue Analytics
- State:
- Created 11 years ago
- Comments:11
Top Results From Across the Web
[JENKINS-47373] Tests fails when git config is not set
If tests are executed without setting local/global git configuration (i.e. neither .git/config either ~/.gitconfig correctly set), tests in class ...
Read more >Git plugin does not set user in pipeline - Jenkins Jira
The workaround from above is not working though if only global git settings are used (not the per project behaviour). The according environment ......
Read more >Git - Jenkins Plugins
The variable bindings are available even if the JGit or JGit with ... If you enable this setting, please report a git plugin...
Read more >Git timeout setting does not work for checkout - Jenkins Jira
When I manually removed the lock and repeated the checkout operation, it indeed took 11 minutes 15 seconds on the node where it...
Read more >[JENKINS-28540] Set git publisher user.name from credentials ...
Set git publisher user.name from credentials instead of using global setting ... line git - get following error when attempt to use git-plugin...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
4 years later and this is still not fixed?..
the easiest way i had a workaround for this was by adding a
.gitconfig
file in the jenkins root folder with the following: