问题描述
我在使用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 "[email protected]" # Your Apple
team_id "abcd..." # Developer Portal Team ID
ENV["FASTLANE_USER"] = "[email protected]"
ENV["MATCH_PASSWORD"] = ""
ENV["FASTLANE_PASSWORD"] = ""
ENV["FASTLANE_APPLE_APPLICATION_SPECIFIC_PASSWORD"] = ""
这是我收到的错误:
如果您是在非交互式会话中运行此文件(例如,服务器或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 orCI) check outhttps://github.com/fastlane/fastlane/tree/master/spaceship#2-step-verification
(输入sms
可以跳过此提示并选择一个受信任的电话号码以短信形式发送代码)
(Input sms
to escape this prompt and select a trusted phone numberto 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 variableSPACESHIP_2FA_SMS_DEFAULT_PHONE_NUMBER
to automate this) (Read moreat: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 [email protected].
example fastlane spaceauth -u [email protected].
您将需要每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.
这篇关于快速通道的两因素身份验证的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!