• 解决jenkins Git Publisher自动打tag的问题


    简单配置一下

    然后开始构建,然后报错如下

    The recommended git tool is: NONE
    using credential 647ee613-5032-4894-aaeb-fe071d285ad5
     > git tag -l v1.0.5 # timeout=10
     > git tag -a -f -m jenkins自动构建tag v1.0.5 # timeout=10
    ERROR: Failed to push tag v1.0.5 to test
    hudson.plugins.git.GitException: Could not apply tag v1.0.5
    	at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.tag(CliGitAPIImpl.java:1855)
    	at hudson.plugins.git.GitAPI.tag(GitAPI.java:293)
    	at hudson.plugins.git.GitPublisher.perform(GitPublisher.java:267)
    	at hudson.tasks.BuildStepMonitor$1.perform(BuildStepMonitor.java:20)
    	at hudson.model.AbstractBuild$AbstractBuildExecution.perform(AbstractBuild.java:806)
    	at hudson.model.AbstractBuild$AbstractBuildExecution.performAllBuildSteps(AbstractBuild.java:755)
    	at hudson.maven.MavenModuleSetBuild$MavenModuleSetBuildExecution.post2(MavenModuleSetBuild.java:1072)
    	at hudson.model.AbstractBuild$AbstractBuildExecution.post(AbstractBuild.java:699)
    	at hudson.model.Run.execute(Run.java:1913)
    	at hudson.maven.MavenModuleSetBuild.run(MavenModuleSetBuild.java:543)
    	at hudson.model.ResourceController.execute(ResourceController.java:99)
    	at hudson.model.Executor.run(Executor.java:431)
    Caused by: hudson.plugins.git.GitException: Command "git tag -a -f -m jenkins自动构建tag v1.0.5" returned status code 128:
    stdout: 
    stderr: Committer identity unknown
    
    *** Please tell me who you are.
    
    Run
    
      git config --global user.email "you@example.com"
      git config --global user.name "Your Name"
    
    to set your account's default identity.
    Omit --global to set the identity only in this repository.
    
    fatal: unable to auto-detect email address (got 'root@71150b1d0fc0.(none)')
    
    	at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.launchCommandIn(CliGitAPIImpl.java:2681)
    	at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.launchCommandIn(CliGitAPIImpl.java:2611)
    	at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.launchCommandIn(CliGitAPIImpl.java:2607)
    	at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.launchCommand(CliGitAPIImpl.java:1974)
    	at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.launchCommand(CliGitAPIImpl.java:1986)
    	at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.tag(CliGitAPIImpl.java:1853)
    	... 11 more
    Build step 'Git Publisher' marked build as failure
    Sending e-mails to: 1569475484@qq.com
    ERROR: Couldn't connect to host, port: localhost, 25; timeout 60000
    com.sun.mail.util.MailConnectException: Couldn't connect to host, port: localhost, 25; timeout 60000;
      nested exception is:
    	java.net.ConnectException: Connection refused (Connection refused)
    	at com.sun.mail.smtp.SMTPTransport.openServer(SMTPTransport.java:2210)
    	at com.sun.mail.smtp.SMTPTransport.protocolConnect(SMTPTransport.java:722)
    	at javax.mail.Service.connect(Service.java:342)
    	at javax.mail.Service.connect(Service.java:222)
    	at javax.mail.Service.connect(Service.java:171)
    	at javax.mail.Transport.send0(Transport.java:230)
    	at javax.mail.Transport.send(Transport.java:100)
    	at hudson.tasks.MailSender.run(MailSender.java:131)
    	at hudson.tasks.MailSender.execute(MailSender.java:106)
    	at hudson.maven.MavenModuleSetBuild$MavenModuleSetBuildExecution.cleanUp(MavenModuleSetBuild.java:1093)
    	at hudson.model.Run.execute(Run.java:1935)
    	at hudson.maven.MavenModuleSetBuild.run(MavenModuleSetBuild.java:543)
    	at hudson.model.ResourceController.execute(ResourceController.java:99)
    	at hudson.model.Executor.run(Executor.java:431)
    Caused by: java.net.ConnectException: Connection refused (Connection refused)
    	at java.base/java.net.PlainSocketImpl.socketConnect(Native Method)
    	at java.base/java.net.AbstractPlainSocketImpl.doConnect(Unknown Source)
    	at java.base/java.net.AbstractPlainSocketImpl.connectToAddress(Unknown Source)
    	at java.base/java.net.AbstractPlainSocketImpl.connect(Unknown Source)
    	at java.base/java.net.SocksSocketImpl.connect(Unknown Source)
    	at java.base/java.net.Socket.connect(Unknown Source)
    	at com.sun.mail.util.SocketFetcher.createSocket(SocketFetcher.java:333)
    	at com.sun.mail.util.SocketFetcher.getSocket(SocketFetcher.java:214)
    	at com.sun.mail.smtp.SMTPTransport.openServer(SMTPTransport.java:2160)
    	... 13 more
    Finished: FAILURE
    
    

    解决方法:

    这个只要执行过一次,就行了,下次构件可以直接把这个删除

  • 相关阅读:
    你还在钟情于windows XP吗?
    我常用的vim快捷键
    2013年读的书(很多还没看完)
    期末考试了
    顺着自己的心,去做自己喜欢的事
    关于最近新闻泛滥的几点看法以及学习的个人观点
    华为OJ_1
    【Android】弹出软键盘时候让上面布局跟着上移的方法
    【Android】策略模式封装百度地图路线规划模块
    google觉得好用的插件(不断更新)
  • 原文地址:https://www.cnblogs.com/chenlifan/p/15592947.html
Copyright © 2020-2023  润新知