jenkins - git发布者错误

时间:2017-04-06 13:31:14

标签: git jenkins

jenkins的Git发行商一直在失败并说“请告诉我你是谁”。我已经尝试过运行git config --global user.name和user.email但是那个dit没有帮助

14:25:36  > git tag -l jenkins-jobname1 # timeout=10
14:25:36  > git tag -a -f -m Jenkins Build #101 jenkins-jobname-SUCCESS # timeout=10
14:25:36 ERROR: Failed to push merge to origin repository
14:25:36 hudson.plugins.git.GitException: Could not apply tag jenkins-jobname-SUCCESS
14:25:36    at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.tag(CliGitAPIImpl.java:1373)
14:25:36    at hudson.plugins.git.GitAPI.tag(GitAPI.java:274)
14:25:36    at hudson.plugins.git.GitPublisher.perform(GitPublisher.java:215)
14:25:36    at hudson.tasks.BuildStepMonitor$3.perform(BuildStepMonitor.java:45)
14:25:36    at hudson.model.AbstractBuild$AbstractBuildExecution.perform(AbstractBuild.java:779)
14:25:36    at hudson.model.AbstractBuild$AbstractBuildExecution.performAllBuildSteps(AbstractBuild.java:720)
14:25:36    at hudson.model.Build$BuildExecution.post2(Build.java:186)
14:25:36    at hudson.model.AbstractBuild$AbstractBuildExecution.post(AbstractBuild.java:665)
14:25:36    at hudson.model.Run.execute(Run.java:1753)
14:25:36    at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:43)
14:25:36    at hudson.model.ResourceController.execute(ResourceController.java:98)
14:25:36    at hudson.model.Executor.run(Executor.java:405)
14:25:36 Caused by: hudson.plugins.git.GitException: Command "git tag -a -f -m Jenkins Build #101 jenkins--jobname-SUCCESS" returned status code 128:
14:25:36 stdout: 
14:25:36 stderr: 
14:25:36 *** Please tell me who you are.
14:25:36 
14:25:36 Run
14:25:36 
14:25:36   git config --global user.email "you@example.com"
14:25:36   git config --global user.name "Your Name"
14:25:36 
14:25:36 to set your account's default identity.
14:25:36 Omit --global to set the identity only in this repository.
14:25:36 
14:25:36 fatal: empty ident name (for <jenkins@jenkins01.(none)>) not allowed
14:25:36 
14:25:36    at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.launchCommandIn(CliGitAPIImpl.java:1799)
14:25:36    at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.launchCommandIn(CliGitAPIImpl.java:1772)
14:25:36    at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.launchCommandIn(CliGitAPIImpl.java:1768)
14:25:36    at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.launchCommand(CliGitAPIImpl.java:1415)
14:25:36    at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.launchCommand(CliGitAPIImpl.java:1427)
14:25:36    at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.tag(CliGitAPIImpl.java:1371)
14:25:36    ... 11 more
14:25:36 Build step 'Git Publisher' marked build as failure

任何想法如何解决它?

1 个答案:

答案 0 :(得分:1)

如果它正在使用jenkins用户:

sudo -u jenkins git config --global user.email "you@example.com"
sudo -u jenkins git config --global user.name "Your name"

这将在该用户的家中创建.gitconfig