Fastlane Boarding 与双因素身份验证 [英] Fastlane Boarding with two-factor authentication

查看:40
本文介绍了Fastlane Boarding 与双因素身份验证的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我遵循了登机 github 页面上的入门"指南,但我的 heroku 页面上不断出现此错误 我们很抱歉,但出了点问题.

I followed the "Getting Started" guide on the boarding github page, but I keep getting this error on my heroku page We're sorry, but something went wrong.

登机页面确实说双因素身份验证有效并转到此处:https://github.com/fastlane/fastlane/blob/master/spaceship/README.md#2-step-verification 但我不知道如何添加将该 cookie 发送到我的 heroku 网站.

The boarding page does say that the two-factor auth works and to go here: https://github.com/fastlane/fastlane/blob/master/spaceship/README.md#2-step-verification but I'm not sure how to add that cookie to my heroku site.

提前致谢.

推荐答案

Fastlane now (as of version 2.160.0) 支持 Apple 的 App Store Connect API.这避免了 2FA 会话黑客的所有问题.仍然有一些 fastlane 操作没有得到完全支持,但大多数都得到了支持.

Fastlane now (as of version 2.160.0) supports Apple's App Store Connect API. This avoids all the problems with 2FA session hacks. There are still a few fastlane actions that do not have full support but the majority do.

https://docs.fastlane.tools/app-store-connect-api/ 解释了如何开始在 fastlane 中使用 API 密钥.

https://docs.fastlane.tools/app-store-connect-api/ explains how to start using an API key in fastlane.

总而言之,您需要执行以下操作(这些示例直接来自该文档):

In summary, here's what you need to do (these examples come straight from that documentation):

  1. 创建 App Store Connect API 密钥
  2. 从同一页面,下载新的密钥 .p8 私钥文件并将其保存在安全的地方(警告:您只能下载一次).记下 Key ID 和 Issuer ID,因为您很快就会再次需要它们.
  3. 使用 app_store_connect_api_key 操作在 Fastfile 中指定新密钥:
  1. Create an App Store Connect API Key
  2. From that same page, download the new key .p8 private key file and save it somewhere safe (WARNING: you can only download it once). Take note of the Key ID and the Issuer ID as you'll need them again shortly.
  3. Either use the app_store_connect_api_key action to specify the new key in your Fastfile:

lane :release do
  api_key = app_store_connect_api_key(
    key_id: "D383SF739",
    issuer_id: "6053b7fe-68a8-4acb-89be-165aa6465141",
    key_filepath: "./AuthKey_D383SF739.p8",
    duration: 1200, # optional
    in_house: false, # optional but may be required if using match/sigh
  )

  pilot(api_key: api_key)
end

或者,将详细信息写入 JSON 文件:

Or, write the details to a JSON file:

{
  "key_id": "D383SF739",
  "issuer_id": "6053b7fe-68a8-4acb-89be-165aa6465141",
  "key": "-----BEGIN PRIVATE KEY-----
MIGTAgEAMBMGByqGSM49AgEGCCqGSM49AwEHBHknlhdlYdLu
-----END PRIVATE KEY-----",
  "duration": 1200, # optional
  "in_house": false, # optional but may be required if using match/sigh
}

并在您的 Fastfile 中引用 JSON 文件:

and reference the JSON file either in your Fastfile:

lane :release do
  pilot( api_key_path: "fastlane/D383SF739.json" )
end

或者通过命令行:

$ fastlane pilot distribute --api_key_path fastlane/D383SF739.json

这篇关于Fastlane Boarding 与双因素身份验证的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆