简体   繁体   English

git push和git clone有效,但mvn版本无效:分支

[英]git push and git clone works but not mvn release:branch

I'm trying to build my Linux VM to interact with Git. 我正在尝试构建Linux虚拟机以与Git进行交互。 I generated private/public SSH keys and put the public key in Git. 我生成了专用/公用SSH密钥,并将公用密钥放入Git中。 I can git clone and git push without requiring a password. 我可以使用git clonegit push而不需要密码。 So I think everything is setup correctly. 所以我认为一切都正确设置。

But when I try to run mvn release:branch it's asking for a username and password. 但是,当我尝试运行mvn release:branch ,要求输入用户名和密码。

Does it require that we need a different setup just for mvn commands? 是否需要为mvn命令设置其他设置?

The mvn release plugin would use the project.scm.developerConnection element in your pom.xml to know where to push a tagged source (or here a source with a new branch), before making the actual release to Nexus. mvn release插件会在将实际版本发布到Nexus之前,使用pom.xmlproject.scm.developerConnection元素来知道将标记源(或带有新分支的源)推送到何处。

If that connection uses an https URL, then credentials would be required. 如果该连接使用https URL,则将需要凭据。

This article shows that the connection might be specified explicitly: 本文显示可以明确指定连接:

Apparently, the release:branch goal doesn't make any release.properties file or other files that the release:perform goal expects. 显然, release:branch目标不会生成任何release.properties文件或release:perform目标期望的其他文件。

So try instead mvn release:prepare 因此,请尝试改用mvn release:prepare

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

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