解决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
解决方法:
这个只要执行过一次,就行了,下次构件可以直接把这个删除
解决jenkins Git Publisher自动打tag的问题的更多相关文章
- 解决jenkins git timeout的问题
进入项目配置(project configure) "源码管理"选项卡中,找到Additional Behaviours点击旁边的 add image.png 点击advanc ...
- jenkin+Git子模块自动拉取代码
jenkins+Git子模块自动拉取代码 添加Git子模块 先克隆想要添加子模块的仓库git clone ssh://git@ip:port/user/project.git,这个是主目录. 进入仓库 ...
- Jenkins 发布后自动创建git tag
为了便于项目中对发布的版本进行回滚,所以我们每次发布完成以后自动创建git tag. 1,创建一个Jenkins任务,命名成为push_tag_demo: 2,配置<源码管理>,这里配置比 ...
- Jenkins 配合 GitLab 实现分支的自动合并、自动创建 Tag
Jenkins 配合 GitLab 实现分支的自动合并.自动创建 Tag 背景 GitFlow工作流简介 Gitflow工作流定义了一个围绕项目发布的严格分支模型,它会相对复杂一点,但提供了用于一个健 ...
- jenkins-构建job成功后自动打tag到git仓库
需求:最近开发同事提出了个要求,每当Jenkins执行上线部署完成后,对当前代码进行自动打TAG到git仓库中,且只有当部署成功后才进行打TAG,防止构建失败也进行打过多的垃圾tag,然后便于下次进行 ...
- 使用Jenkins + git submodule 实现自动化编译,解决代码安全性问题
道哥的第 030 篇原创 目录 一.一个真实的代码泄漏故事 二.Jenkins 的基本使用 1. Jenkins 是什么? 2. 安装 JDK8 3. 安装 Jenkins 4. 在浏览器中配置 Je ...
- jenkins系列(11)-自动打tag升级篇
很久以前,小怪分享过一篇jenkins自动打tag的文章(jenkins系列1--自动打tag),经过在项目实战和改进,我们升级了方案,现在和大家分享.,希望大家在工作中能够用起来. 使用步骤: 1. ...
- Jenkins:使用Git Parameter插件实现tag或分支的选择性构建
Jenkins如何选择任意一个tag来构建代码 Jenkins如何选择任意一个branch(分支)来构建代码 苦恼了一段时间后,发现Git Parameter插件实现可以帮助我们来实现. 下面来介绍如 ...
- Jenkins+Git的搭建和自动部署
前言 Jenkins在工作中都使用过,之前都是运维去搭建部署,弄好了之后给我一个网址去构建项目就可以了,所以也都是一直没了解过安装过程. 今天在自己的服务器上搭建了一遍,中间有遇到很多坑,特在此归纳总 ...
- 解决Jenkins用shell脚本部署后,Jenkins自动杀掉启衍生出来的守护进程
Jenkins部署java项目遇到的问题: 1.Jenkins执行构建后,需要手动执行startup.sh,站点才能正常访问 产生原因: shell脚本发布时,会衍生进程,Jenkins默认会自动杀掉 ...
随机推荐
- ROS之交叉编译配置
参考资料: https://zhuanlan.zhihu.com/p/183819313 https://www.guyuehome.com/33759 1.原理 所谓的交叉编译,其实我们可以从编译原 ...
- 基于minsit数据集的图像分类任务|CNN简单应用项目
Github地址 Image-classification-task-based-on-minsit-datasethttps://github.com/Yufccode/CollegeWorks/t ...
- TortoiseSVN 官网打不开,去哪下最新的软件和中文包?
官网:https://tortoisesvn.net 能打开最好,但通常打不开,打不开时候去这个网站下: https://sourceforge.net/projects/tortoisesvn/ 这 ...
- 使用 BrowserView 的注意事项!!
请看gif:
- 从零开始的react入门教程(二),从react组件说到props/state的联系与区别
壹 ❀ 引 在从零开始的react入门教程(一)一文中,我们搭建了第一个属于自己的react应用,并简单学习了jsx语法.jsx写法上与dom标签高度一致,当然我们也知道,本质上这些react元素都是 ...
- NC16655 [NOIP2005]过河
题目链接 题目 题目描述 在河上有一座独木桥,一只青蛙想沿着独木桥从河的一侧跳到另一侧.在桥上有一些石子,青蛙很讨厌踩在这些石子上.由于桥的长度和青蛙一次跳过的距离都是正整数,我们可以把独木桥上青蛙可 ...
- Springboot+Bootstrap实现增删改查实战
说明 最近有朋友问我有没有Springboot+Bootstrap实现增删改查的DEMO,当时没有,现在他来了! 实现效果 代码地址 https://gitee.com/indexman/bootst ...
- 解决oracle11g ORA-00119 ORA-00132方法
转自:http://blog.sina.com.cn/s/blog_8334b46001016vk5.html 在linux下启动oracle11g是报如下错误: ORA-00119: invalid ...
- MyBatis实现多行合并(collection标签使用)
举个栗子 现有如下表结构,用户表.角色表.用户角色关联表. 一个用户有多个角色,一个角色有可以给多个用户,也即常见的多对多场景. 现有这样一个需求,分页查询用户数据,除了用户ID和用户名称字段,还要查 ...
- 【Android逆向】滚动的天空中插入smali日志
1. 编写一个MyLog.java 放到一个android工程下,编译打包,然后反编译拿到MyLog的smali代码 package com.example.logapplication; impor ...