jenkins - git publisher error
问题描述:
詹金斯的Git发布者一直在失败,并说“请告诉我你是谁”。我试着运行混帐配置--global user.name和user.email但是这DIT不由jenkins - git publisher error
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 "[email protected]"
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 <[email protected](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
任何想法,我该如何解决?
答
如果它使用詹金斯用户:
sudo -u jenkins git config --global user.email "[email protected]"
sudo -u jenkins git config --global user.name "Your name"
这将创建在用户家.gitconfig
。
你是否运行'git config'作为jenkins用户(或任何用户使用)?如果它使用jenkins用户:'sudo -u jenkins git config --global user.email“[email protected]”'(然后与user.name相同)。这将在该用户的家中创建.gitconfig。 – odradek
是我有,但它并没有帮助 – jdoe
奇怪 - 再次运行它,它的工作。谢谢!你可以将它添加为解决方案,我将其标记为正确的答案? – jdoe