如何向unleash-maven-plugin提供github凭据?

问题描述 投票:0回答:1

我有一个非常简单的maven项目发布到github,我启用了2FA。我想使用unleash-maven-plugin发布新版本(看起来像改进/刷新的maven-release-plugin)。我按照说明进行操作,但对于如何提供凭据并不是非常具体。我可以使用用户名/密码(由于2FA无法正常工作,可以吗?)或密码到我的~/.ssh中的私钥。

我尝试使用httpsgit连接并在查询远程git存储库以查找标记'1.0.0'时遇到此错误:Algorithm negotiation fail

我需要做些什么来完成这项工作?

git maven github release maven-release-plugin
1个回答
0
投票

在文档中是:

Custom SCM credentials
Sometimes it is necessary to provide SCM credentials to the SCM provider. This can be the case if the system does not cache the credentials or if you want to make SCM changes as a specific user. You can use the parameters scmUsername adn scmPassword for this purpose. When calling the goal from command line and providing these parameters through system properties the call would look like this:

mvn unleash:perform -Dunleash.scmUsername=... -Dunleash.scmPassword=...

你尝试过:

mvn unleash:perform -Dunleash.scmSshPassphrase=<private key here>

要么:

PRIVATE_KEY=<private key>

mvn unleash:perform -Dunleash.scmSshPassphraseEnvVar=PRIVATE_KEY
© www.soinside.com 2019 - 2024. All rights reserved.