快速通道的两因素身份验证

问题描述:

我在使用CI机器时将我的应用发布到Firebase发行版时会抛出Fastlane. 我面临2FA的问题.

Im releasing my app to firebase distribution throw Fastlane while using CI machine. Im facing an issue with the 2FA.

我正在使用Match来检索我的证书. 这就是我在"Appfile"下拥有的

Im using Match to retrieve my certificates. This is what I have under "Appfile"

app_identifier "com.example.example" # the bundle 
apple_id "appleAcount@gmail.com" # Your Apple
team_id "abcd..."  # Developer Portal Team ID
ENV["FASTLANE_USER"] = "appleAcount@gmail.com"
ENV["MATCH_PASSWORD"] = ""
ENV["FASTLANE_PASSWORD"] = ""
ENV["FASTLANE_APPLE_APPLICATION_SPECIFIC_PASSWORD"] = ""

这是我收到的错误:

为帐户启用了双重身份验证(6位代码) 'appleAcount@gmail.com'有关两因素的更多信息 身份验证: https://support.apple.com/en-us/HT204915

Two-factor Authentication (6 digits code) is enabled for account 'appleAcount@gmail.com' More information about Two-factor Authentication: https://support.apple.com/en-us/HT204915

如果您是在非交互式会话中运行此文件(例如,服务器或 CI)签出 https://github.com/fastlane/fastlane/tree/master/spaceship#2-step-verification

If you're running this in a non-interactive session (e.g. server or CI) check out https://github.com/fastlane/fastlane/tree/master/spaceship#2-step-verification

(输入sms可以跳过此提示并选择一个受信任的电话号码 以短信形式发送代码)

(Input sms to escape this prompt and select a trusted phone number to send the code as a text message)

(您还可以设置环境变量 SPACESHIP_2FA_SMS_DEFAULT_PHONE_NUMBER使其自动化)(更多信息 在: https://github.com/fastlane/fastlane/blob/master/spaceship/docs/Authentication.md#auto-select-sms-via-spaceship_2fa_sms_default_phone_number )

(You can also set the environment variable SPACESHIP_2FA_SMS_DEFAULT_PHONE_NUMBER to automate this) (Read more at: https://github.com/fastlane/fastlane/blob/master/spaceship/docs/Authentication.md#auto-select-sms-via-spaceship_2fa_sms_default_phone_number)

请输入6位数字代码:

我已阅读此"https://docs.fastlane.tools/best-practices/continuous-integration/"但没有运气.谁能帮我解决这个问题?

I have read this "https://docs.fastlane.tools/best-practices/continuous-integration/" but with no luck. can anyone help me solve this issue?

您需要设置环境变量'FASTLANE_SESSION'='--- \ n .... \ n'标记.

You need to set up a environment variable 'FASTLANE_SESSION'='---\n....\n' token.

要获取此令牌,您需要使用以下命令手动进行身份验证:

To get this token you need to authenticate manually using this command:

fastlane spaceauth -u YOUR_APP_STORE_EMAIL

fastlane spaceauth -u YOUR_APP_STORE_EMAIL

fastlane spaceauth示例-u joe@test.com.

example fastlane spaceauth -u joe@test.com.

您将需要每2-3周(约30天)重新验证一次会话.这个过程现在有点痛苦.

You will need to revalidate every 2-3 weeks (some say 30 days) your session. The process is kinda of a pain right now.