无法在 mvn 发布时将文件提交到 github:spring boot 中的准备

请指导我在执行 mvn release:prepare 时如何继续进行,如果需要,请告诉我如何在我的项目中添加 ssh 密钥。我尝试了许多解决方案,但没有一个有效,因为它每次都显示相同的错误,这是我基于模块化方法的项目,我使用的 IDE 是 IntelliJ。


[ERROR] Failed to execute goal org.apache.maven.plugins:maven-release- plugin:2.5.3:prepare (default-cli) on project vj-pet-clinic: Unable to commit files

[ERROR] Provider message:

[ERROR] The git-push command failed.

[ERROR] Command output:

[ERROR] git@github.com: Permission denied (publickey).

[ERROR] fatal: Could not read from remote repository.

[ERROR] Please make sure you have the correct access rights

[ERROR] and the repository exists.

[ERROR]

[ERROR] -> [Help 1]

[ERROR]

[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.

[ERROR] Re-run Maven using the -X switch to enable full debug logging.

[ERROR]

[ERROR] For more information about the errors and possible solutions, please read the following articles:

[ERROR] [Help 1]

http://cwiki.apache.org/confluence/display/MAVEN/MojoFailureException


喵喵时光机
浏览 119回答 1
1回答

慕码人2483693

您可以使用 HTTPS 而不是 SSH 来避免密钥交换。这是一个例子:&nbsp; <scm>&nbsp; &nbsp; &nbsp; &nbsp; <url>https://github.com/(username)/(repo)</url>&nbsp; &nbsp; &nbsp; &nbsp; <connection>scm:git:https://github.com/(username)/(repo).git</connection>&nbsp; </scm>(username)并相应地替换(repo)。
打开App,查看更多内容
随时随地看视频慕课网APP

相关分类

Java