gpt4 book ai didi

react-native - Github Actions expo 上传 :ios returning Invalid credentials

转载 作者:行者123 更新时间:2023-12-04 13:34:16 27 4
gpt4 key购买 nike

我已经设置了 GitHub 操作来使用 expo cli 构建和上传我的 iOS 二进制文件。
运行时 expo build:ios ,它工作正常。
运行时 expo upload:ios它显示以下错误:

Run expo upload:ios --latest --apple-id=*** --apple-id-password=***
[06:48:59] Downloading build from https://exp-shell-app-assets.s3.us-west-1.amazonaws.com/ios/%40jucasoliveira/cluster-stack-App-413c0004-9f15-43c0-8b79-9748107c9c80-archive.ipa

[06:49:07] Resolving the ITC team ID...
[06:49:10] Failed to upload the standalone app to the app store.
[06:49:10] Invalid Apple ID credentials
[06:49:10] Error: Invalid Apple ID credentials
at runFastlaneAsync (/Users/runner/hostedtoolcache/expo-cli/3.22.3/x64/node_modules/expo-cli/src/commands/upload/utils.ts:89:11)
at runMicrotasks (<anonymous>)
at processTicksAndRejections (internal/process/task_queues.js:97:5)
at IOSUploader._uploadToTheStore (/Users/runner/hostedtoolcache/expo-cli/3.22.3/x64/node_modules/expo-cli/src/commands/upload/IOSUploader.ts:197:40)
at IOSUploader.upload (/Users/runner/hostedtoolcache/expo-cli/3.22.3/x64/node_modules/expo-cli/src/commands/upload/BaseUploader.ts:33:5)
at /Users/runner/hostedtoolcache/expo-cli/3.22.3/x64/node_modules/expo-cli/src/commands/upload.ts:119:9
at Command.<anonymous> (/Users/runner/hostedtoolcache/expo-cli/3.22.3/x64/node_modules/expo-cli/src/exp.ts:80:7)
##[error]Process completed with exit code 1.
当我在本地机器上使用 expo cli 构建和上传 iOS 二进制文件时,它可以正常工作。
工作流.yml
name: Expo Publish
on:
push:
branches:
- master
jobs:
build:
name: Install and publish
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v1
with:
node-version: 12.x
- uses: expo/expo-github-action@v5
with:
expo-version: 3.x
expo-username: ${{ secrets.EXPO_CLI_USERNAME }}
expo-password: ${{ secrets.EXPO_CLI_PASSWORD }}
- run: yarn install
- run: expo build:ios -t archive
- run: expo build:android -t app-bundle
deploy_apple:
needs: build
name: Deploying to Testflight
runs-on: macOS-latest
steps:
- name: Checkout repository
uses: actions/checkout@v1
- name: Install gpg
run: brew install gnupg
- uses: expo/expo-github-action@v5
with:
expo-version: 3.x
expo-username: ${{ secrets.EXPO_CLI_USERNAME }}
expo-password: ${{ secrets.EXPO_CLI_PASSWORD }}
- run: expo upload:ios --latest --apple-id=${{ secrets.APPLE_ID_USERNAME}} --apple-id-password=${{ secrets.APPLE_ID_PASSWORD }}

最佳答案

我在运行 expo upload:ios 时遇到了完全相同的问题来自 Github Actions。 expo build:ios工作正常,expo upload:ios在本地对我来说效果很好,但我无法让它在行动中发挥作用。
两因素身份验证问题
问题是,如果我使用我的 apple-idapple-id-password与我的 Apple 帐户相关联,我遇到了 2FA 问题:

- name: Deploy to Testflight
run: expo upload:ios --apple-id $EXPO_APPLE_ID --apple-id-password $EXPO_APPLE_PASSWORD
env:
EXPO_APPLE_ID: ${{secrets.EXPO_APPLE_ID}}
EXPO_APPLE_PASSWORD: ${{secrets.EXPO_APPLE_ID_PASSWORD}}
应用程序商店使用我的用户名和密码识别出我,但它会在我的手机上向我发送一个代码,我应该通过 stdin 输入该代码。我不能用 Github Action 来做到这一点。这是结果输出:
[00:29:50] Resolving the ITC team ID...
Two-factor Authentication (6 digits code) is enabled for account '***'
More information about Two-factor Authentication: https://support.apple.com/en-us/HT204915

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

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

(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)

Please enter the 6 digit code:
[00:29:53] Failed to upload the standalone app to the app store.
[00:29:53] The input stream is exhausted.
应用专用密码
因此 CI 的解决方案是使用特定于应用程序的密码。我创建了一个特定于应用程序的密码,为了确保一切正常,我运行了 expo upload:ios --apple-id 🤫 --apple-id-password 🤫在我的 mac 本地运行并且它工作正常,它将我的最后一个构建上传到 TestFlight。 (假设🤫是正确的ID和密码)。为了确定起见,我将它们硬编码到命令中。
因此,出于某种原因,当我在 Github 中使用完全相同的应用特定密码运行完全相同的命令时,我收到一条错误消息,提示无效的 Apple id 凭据:
run: expo upload:ios --apple-id 🤫 --apple-id-password 🤫
Github Actions 上的输出是这样的:
Run expo upload:ios --apple-id 🤫 --apple-id-password 🤫
[20:15:57] Accessing credentials for *** in project MacCheese
[20:15:59] Downloading build from https://exp-shell-app-assets.s3.us-west-1.amazonaws.com/ios/%40***/MacCheese-cc930f79-18ac-4e33-937d-771613bcd004-archive.ipa

[20:16:03] Resolving the ITC team ID...
[20:16:07] Failed to upload the standalone app to the app store.
[20:16:07] Invalid Apple ID credentials
[20:16:07] Error: Invalid Apple ID credentials
我硬编码 apple-id 的原因和 apple-id-password进入命令,是因为我已经尝试了一切。我已经在阳光下尝试了各种环境变量的组合。我在错误消息中阅读了一些关于 App 特定密码的内容,因此我尝试添加更多环境变量以使其工作:
- name: Deploy to Testflight
run: expo upload:ios --apple-id $EXPO_APPLE_ID --apple-id-password $EXPO_APPLE_PASSWORD
env:
EXPO_APPLE_ID: ${{secrets.EXPO_APPLE_ID}}
EXPO_APPLE_PASSWORD: ${{secrets.EXPO_APPLE_ID_PASSWORD}}
FASTLANE_APPLE_APPLICATION_SPECIFIC_PASSWORD: ${{ secrets.EXPO_APPLE_APP_PASSWORD }}
APPLE_APPLICATION_SPECIFIC_PASSWORD: ${{ secrets.EXPO_APPLE_APP_PASSWORD }}
我知道我拥有正确的 ID、密码和应用专用密码,因为我已经将它们更新了 10 亿次。出于某种原因, expo upload:ios带有应用程序特定密码的命令将在本地工作,但不适用于 Github 操作。
有什么建议?

关于react-native - Github Actions expo 上传 :ios returning Invalid credentials,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/63174622/

27 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com