【问题标题】:How do I provide the github credentials to the unleash-maven-plugin?如何向 unleash-maven-plugin 提供 github 凭据?
【发布时间】:2019-08-05 00:19:03
【问题描述】:

我有一个非常简单的 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】:

    在文档中是:

    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
    

    【讨论】:

    • 密码参数中的私钥本身?!?这听起来很奇怪(并且没有记录),我什至都不愿意尝试!
    猜你喜欢
    • 2020-03-12
    • 2022-08-19
    • 1970-01-01
    • 1970-01-01
    • 2015-01-02
    • 1970-01-01
    • 1970-01-01
    • 2014-04-29
    • 2017-02-12
    相关资源
    最近更新 更多