【问题标题】:Install4J notarization for MacOs fails based on new & needed 2-factor authMacOs 的 Install4J 公证失败基于新的和需要的 2 因素身份验证
【发布时间】:2021-02-08 15:54:51
【问题描述】:

从 2021 年 2 月开始,所有用户都需要进行两步验证或两步验证才能登录 App Store Connect (https://developer.apple.com/support/authentication/)。

目前我们按照 install4j 文档的描述进行公证,其中 install4j 被配置为为我们完成整个公证过程:启用公证,在配置和密码中提供 codeSigning 证书和苹果 ID身份验证由 CI 环境中的 --apple-id-password 命令行参数提供。

现在,当我们的 CI 构建尝试进行身份验证以上传本机 dmg 进行公证时,为我们的帐户启用两个因素会导致问题,因为验证码 SMS 现在已发送到我们的手机。

我们如何配置 install4j 以使用 2 因素 Apple Id 帐户进行公证?

构建输出:

[INFO] install4j: compilation failed. Reason: We are unable to create an authentication session. (code -22016)
[INFO] Uploading my-app.dmg for notarization
Failed to execute goal org.sonatype.install4j:install4j-maven-plugin:1.1.2:compile (compile-installers) on project native-installer: null returned: 1

【问题讨论】:

    标签: java macos authentication install4j notarize


    【解决方案1】:

    当您使用双重身份验证时,您必须使用应用专用密码,如 https://support.apple.com/en-us/HT204397 中所述

    【讨论】:

    • 对于有同样问题的人来说只是一个简短的说明:您可以使用您的默认 Apple-ID,但需要定义一个特定于应用程序的密码。因此,对于 install4J 等工具,您只需将默认 Apple-ID 密码更改为应用专用密码即可。
    猜你喜欢
    • 2013-06-06
    • 1970-01-01
    • 2011-05-02
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2018-09-18
    • 1970-01-01
    相关资源
    最近更新 更多