question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

git fails if no global email/name set, even if set in Jenkins interface

See original GitHub issue

I 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:open
  • Created 11 years ago
  • Comments:11

github_iconTop GitHub Comments

7reactions
namedgraphcommented, Aug 30, 2017

4 years later and this is still not fixed?..

4reactions
developerinlondoncommented, Nov 19, 2014

the easiest way i had a workaround for this was by adding a .gitconfig file in the jenkins root folder with the following:

[user]
        name = <git-username>
        email = <git-email>
Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found