简体   繁体   English

使用maven-release-plugin wit Git

[英]Using maven-release-plugin wit Git

I have created a java project with maven. 我用maven创建了一个java项目。 I am trying to make releases of my project using maven-release plugin. 我正在尝试使用maven-release插件发布我的项目。

when i execute following commands in the order shown in the image below, maven release plugin stuck where it tries to push the changes to git repository 当我按照下图所示的顺序执行以下命令时,maven release插件卡在试图将更改推送到git存储库的位置

Could anybody help me to figure out the issue here. 任何人都可以帮我解决这个问题。

在此输入图像描述

I have added SCM section into the project object model of my application. 我已将SCM部分添加到我的应用程序的项目对象模型中。 I also have set the passphrase using ssh-add. 我也使用ssh-add设置了密码。 but still no luck :( 但仍然没有运气:(

this is the new error i am getting after applying the change to the scm section 这是我将更改应用于scm部分后得到的新错误

在此输入图像描述

Your log shows that Maven is trying to push using HTTPS. 您的日志显示Maven正在尝试使用HTTPS进行推送。 You may have not configured HTTP(S) authentication, that's why pushing to remote repository fails. 您可能尚未配置HTTP(S)身份验证,这就是推送到远程存储库失败的原因。

Since you want to use SSH, you must change your <developerConnection> tag to scm:git:ssh://git@github.com:kitis/sample-multimodule-project.git . 由于您要使用SSH,因此必须将<developerConnection>标记更改为scm:git:ssh://git@github.com:kitis/sample-multimodule-project.git

If you want to use HTTP(S) for pushing, you may try to use a .netrc file. 如果要使用HTTP(S)进行推送,可以尝试使用.netrc文件。

Issue for first image, it may be caused due to missing scm credentials. 第一张图片的问题,可能是由于缺少scm凭据引起的。 I used maven 3.0.5, m2releaseplugin 2.3.2 and git as scm. 我使用maven 3.0.5,m2releaseplugin 2.3.2和git作为scm。 This problem can be solved by providing scm parameters "username" and "password" on project's pom.xml. 这个问题可以通过在项目的pom.xml上提供scm参数“username”和“password”来解决。 Check scm plugin parameters from maven help. 从maven帮助检查scm插件参数。 If you are using Jenkins CI and m2 release plugin, you can specify username/password parameters from web gui. 如果您使用的是Jenkins CI和m2版本插件,则可以从web gui指定用户名/密码参数。 This is due to scm plugin dependency of release plugin. 这是由于发布插件的scm插件依赖性。 Hope this helps 希望这可以帮助

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM