Circleci - 总是收到“没有找到本地代码签名身份”。

din*_*sng 8 ios circleci fastlane

我正在尝试设置 CI 管道来构建 iOS 应用程序;具体来说,我的目标除了构建应用程序之外,还设置自动签名并最终将其推送到 Testflight。当我尝试运行 fastlane 命令在本地构建应用程序时,它按预期工作,但是,每次我尝试使用 fastlane 在 Circleci 上构建它时,我总是收到“没有找到本地代码签名身份”错误,然后是证书和配置配置文件是从存储库安装的,但最终我的构建失败并出现错误:“错误:没有使用 Xcode 注册的帐户。将您的开发人员帐户添加到 Xcode...”。

\n

我不确定这到底是什么问题,我已经fastfile多次更改以包含或排除我在调试时发现的各种选项,但我仍然遇到相同的错误。

\n

以下是管道在 Circleci 上的外观:

\n
/Users/distiller/project/********\n[\xe2\xa0\x8b]  [\xe2\xa0\x99]  [\xe2\xa0\xb9]  [\xe2\xa0\xb8]  [\xe2\xa0\xbc]  [\xe2\xa0\xb4]  [\xe2\xa0\xa6]  [\xe2\xa0\xa7]  [\xe2\xa0\x87]  [\xe2\xa0\x8f]  [\xe2\xa0\x8b]  [\xe2\xa0\x99]  [\xe2\xa0\xb9]  [\xe2\xa0\xb8]  [\xe2\xa0\xbc]  [\xe2\xa0\xb4]  [\xe2\xa0\xa6]  [\xe2\xa0\xa7]  [\xe2\xa0\x87]  [\xe2\x9c\x94]  \n[09:00:06]: Sending anonymous analytics information\n[09:00:06]: Learn more at https://docs.fastlane.tools/#metrics\n[09:00:06]: No personal or sensitive data is sent.\n[09:00:06]: You can disable this by adding `opt_out_usage` at the top of your Fastfile\ntput: No value for $TERM and no -T specified\ntput: No value for $TERM and no -T specified\n[09:00:06]: ----------------------------------------\n[09:00:06]: --- Step: Verifying fastlane version ---\n[09:00:06]: ----------------------------------------\n[09:00:06]: Your fastlane version 2.190.0 matches the minimum requirement of 2.171.0  \xe2\x9c\x85\n[09:00:06]: Driving the lane 'ios beta' \ntput: No value for $TERM and no -T specified\ntput: No value for $TERM and no -T specified\n[09:00:06]: --------------------------------------\n[09:00:06]: --- Step: Switch to ios build lane ---\n[09:00:06]: --------------------------------------\n[09:00:06]: Cruising over to lane 'ios build' \ntput: No value for $TERM and no -T specified\ntput: No value for $TERM and no -T specified\n[09:00:06]: -----------------------------\n[09:00:06]: --- Step: setup_circle_ci ---\n[09:00:06]: -----------------------------\n[09:00:06]: Creating temporary keychain: "fastlane_tmp_keychain".\n[09:00:06]: $ security list-keychains -d user\n[09:00:06]: \xe2\x96\xb8 "/Users/distiller/Library/Keychains/fastlane_tmp_keychain-db"\n[09:00:06]: Found keychain '/Users/distiller/Library/Keychains/fastlane_tmp_keychain-db' in list-keychains, adding to search list skipped\n[09:00:06]: Enabling match readonly mode.\ntput: No value for $TERM and no -T specified\ntput: No value for $TERM and no -T specified\n[09:00:06]: -------------------\n[09:00:06]: --- Step: is_ci ---\n[09:00:06]: -------------------\ntput: No value for $TERM and no -T specified\ntput: No value for $TERM and no -T specified\n[09:00:06]: -------------------\n[09:00:06]: --- Step: match ---\n[09:00:06]: -------------------\n[09:00:06]: Successfully loaded '/Users/distiller/project/********/fastlane/Matchfile' \n\n+----------------+-----------------------------------------------------------------+\n|                   Detected Values from './fastlane/Matchfile'                    |\n+----------------+-----------------------------------------------------------------+\n| git_url        | git@***********************.git |\n| storage_mode   | git                                                             |\n| type           | adhoc                                                           |\n| app_identifier | com.********.app                                            |\n| username       | ****@************.****                                   |\n+----------------+-----------------------------------------------------------------+\n\n\n+--------------------------------+-----------------------------------------------------------------+\n|                                    Summary for match 2.190.0                                     |\n+--------------------------------+-----------------------------------------------------------------+\n| type                           | adhoc                                                           |\n| readonly                       | true                                                            |\n| generate_apple_certs           | true                                                            |\n| skip_provisioning_profiles     | false                                                           |\n| app_identifier                 | ["com.********.app"]                                        |\n| username                       | ****@************.***                                     |\n| team_id                        | ***********|\n| storage_mode                   | git                                                             |\n| git_url                        | git@***********************.git |\n| git_branch                     | master                                                          |\n| shallow_clone                  | false                                                           |\n| clone_branch_directly          | false                                                           |\n| keychain_name                  | fastlane_tmp_keychain                                           |\n| force                          | false                                                           |\n| force_for_new_devices          | false                                                           |\n| skip_confirmation              | false                                                           |\n| skip_docs                      | false                                                           |\n\n| platform                       | ios                                                             |\n| derive_catalyst_app_identifier | false                                                           |\n| fail_on_name_taken             | false                                                           |\n| skip_certificate_matching      | false                                                           |\n| skip_set_partition_list        | false                                                           |\n| verbose                        | false                                                           |\n+--------------------------------+-----------------------------------------------------------------+\n\n[09:00:06]: Cloning remote git repo...\n[09:00:06]: If cloning the repo takes too long, you can use the `clone_branch_directly` option in match.\n[09:00:11]: Checking out branch master...\n[09:00:11]:   Successfully decrypted certificates repo\n[09:00:11]: Installing certificate...\n[09:00:12]: There are no local code signing identities found.\nYou can run `security find-identity -v -p codesigning fastlane_tmp_keychain` to get this output.\nThis Stack Overflow thread has more information: /sf/ask/2477305071/.\n(Check in Keychain Access for an expired WWDR certificate: /sf/answers/2478688481/ has more info.)\n[09:00:12]: Setting key partition list... (this can take a minute if there are a lot of keys installed)\n[09:00:12]: security: SecItemCopyMatching: The specified item could not be found in the keychain.\n[09:00:12]: Setting key partition list... (this can take a minute if there are a lot of keys installed)\n\n+-------------------+-----------------------------------------+\n|                    Installed Certificate                    |\n+-------------------+-----------------------------------------+\n| User ID           | **********                              |\n| Common Name       | *********************                   |\n| Organisation Unit | **********                              |\n| Organisation      | *****                                   |\n| Country           | **                                      |\n| Start Datetime    | 2021-07-13 10:57:41 UTC                 |\n| End Datetime      | 2022-07-13 10:57:40 UTC                 |\n+-------------------+-----------------------------------------+\n\n[09:00:12]: Installing provisioning profile...\n\n+---------------------+----------------------------------------------+------------------------------------------------------------------------------------------------------------------+\n|                                                                            Installed Provisioning Profile                                                                             |\n+---------------------+----------------------------------------------+------------------------------------------------------------------------------------------------------------------+\n| Parameter           | Environment Variable                         | Value                                                                                                            |\n+---------------------+----------------------------------------------+------------------------------------------------------------------------------------------------------------------+\n| App Identifier      |                                              | com.********.app                                                                                             |\n| Type                |                                              | adhoc                                                                                                            |\n| Platform            |                                              | ios                                                                                                              |\n| Profile UUID        | sigh_com.********.app_adhoc              | g611aca9-****-*****-****-*****                                                                             |\n| Profile Name        | sigh_com.********.app_adhoc_profile-name | match AdHoc com.********.app                                                                                 |\n| Profile Path        | sigh_com.********.app_adhoc_profile-path | /Users/distiller/Library/MobileDevice/Provisioning Profiles/g611aca9-****-*****-****-*****.mobileprovision |\n| Development Team ID | sigh_com.********.app_adhoc_team-id      | ****************                                                                                                       |\n+---------------------+----------------------------------------------+------------------------------------------------------------------------------------------------------------------+\n\n[09:00:12]: All required keys, certificates and provisioning profiles are installed \n[09:00:12]: Setting Provisioning Profile type to 'ad-hoc'\ntput: No value for $TERM and no -T specified\ntput: No value for $TERM and no -T specified\n[09:00:12]: ----------------------------------------------------------\n[09:00:12]: --- Step: ns prepare ios --clean --release --env.stage ---\n[09:00:12]: ----------------------------------------------------------\n[09:00:12]: $ ns prepare ios --clean --release --env.stage\n[09:01:48]: \xe2\x96\xb8 \n[09:01:48]: \xe2\x96\xb8 * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *\n[09:01:48]: \xe2\x96\xb8 *                                                                             *\n[09:01:48]: \xe2\x96\xb8 *  Using material components 5.x the N tabs component                         *\n[09:01:48]: \xe2\x96\xb8 *  will not be fonctional anymore.                                            *\n[09:01:48]: \xe2\x96\xb8 *  If you need it migrate to using @nativescript-community/ui-material-tabs   *\n[09:01:48]: \xe2\x96\xb8 *  or go back the 4.x                                                         *\n[09:01:48]: \xe2\x96\xb8 *                                                                             *\n[09:01:48]: \xe2\x96\xb8 * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *\n[09:01:48]: \xe2\x96\xb8 Copying template files...\n[09:01:53]: \xe2\x96\xb8 Platform ios successfully added. v8.0.0\n[09:01:53]: \xe2\x96\xb8 Preparing project...\n...................................................................\n[09:14:59]: \xe2\x96\xb8 Project successfully prepared (ios)\n[09:14:59]: \xe2\x96\xb8 Configure firebase\ntput: No value for $TERM and no -T specified\ntput: No value for $TERM and no -T specified\n[09:15:00]: ------------------------------------------\n[09:15:00]: --- Step: update_code_signing_settings ---\n[09:15:00]: ------------------------------------------\n\n+-----------------------+---------------------------------------+\n|               Summary for code signing settings               |\n+-----------------------+---------------------------------------+\n| use_automatic_signing | true                                  |\n| team_id               | **********                            |\n| path                  | ./platforms/ios/********.xcodeproj |\n+-----------------------+---------------------------------------+\n\n[09:15:00]: Updating the Automatic Codesigning flag to enabled for the given project '/Users/distiller/project/********/platforms/ios/********.xcodeproj/project.pbxproj'\n[09:15:00]: Set Team id to: ********* for target: ******** for build configuration: Debug\n[09:15:00]: Set Team id to: ********* for target: ******** for build configuration: Release\n[09:15:00]: Successfully updated project settings to use Code Sign Style = 'Automatic'\n[09:15:00]: Modified Targets:\n[09:15:00]:      * ********\n[09:15:00]: Modified Build Configurations:\n[09:15:00]:      * Debug\n[09:15:00]:      * Release\ntput: No value for $TERM and no -T specified\ntput: No value for $TERM and no -T specified\n[09:15:00]: -----------------------\n[09:15:00]: --- Step: build_app ---\n[09:15:00]: -----------------------\n[09:15:00]: Resolving Swift Package Manager dependencies...\n[09:15:00]: $ xcodebuild -resolvePackageDependencies -workspace ./platforms/ios/********.xcworkspace -scheme ********\n[09:15:06]: \xe2\x96\xb8 resolved source packages: \n[09:15:06]: $ xcodebuild -showBuildSettings -workspace ./platforms/ios/********.xcworkspace -scheme ********\n[09:15:09]: Command timed out after 3 seconds on try 1 of 4, trying again with a 6 second timeout...\n[09:15:12]: Detected provisioning profile mapping: {:"com.********.app"=>"match AdHoc com.********.app"}\n\n+----------------------------------------------------------+--------------------------------------------------------------+\n|                                                 Summary for gym 2.190.0                                                 |\n+----------------------------------------------------------+--------------------------------------------------------------+\n| xcargs                                                   | -allowProvisioningUpdates                                    |\n| scheme                                                   | ********                                                  |\n| workspace                                                | ./platforms/ios/********.xcworkspace                      |\n| export_method                                            | ad-hoc                                                       |\n| export_options.provisioningProfiles.com.********.app | match AdHoc com.********.app                             |\n| clean                                                    | false                                                        |\n| output_directory                                         | ~/project/output/gym                                         |\n| output_name                                              | ********                                                  |\n| silent                                                   | false                                                        |\n| skip_package_ipa                                         | false                                                        |\n| skip_package_pkg                                         | false                                                        |\n| build_path                                               | /Users/distiller/Library/Developer/Xcode/Archives/2021-08-03 |\n| result_bundle                                            | false                                                        |\n| buildlog_path                                            | ~/project/output/buildlogs/gym                               |\n| destination                                              | generic/platform=iOS                                         |\n| skip_profile_detection                                   | false                                                        |\n| skip_package_dependencies_resolution                     | false                                                        |\n| disable_package_automatic_updates                        | false                                                        |\n| use_system_scm                                           | false                                                        |\n| xcode_path                                               | /Applications/Xcode-11.GM.Seed.2.app                         |\n+----------------------------------------------------------+--------------------------------------------------------------+\n\n[09:15:12]: $ set -o pipefail && xcodebuild -workspace ./platforms/ios/********.xcworkspace -scheme ******** -destination 'generic/platform=iOS' -archivePath /Users/distiller/Library/Developer/Xcode/Archives/2021-08-03/********\\ 2021-08-03\\ 09.15.12.xcarchive -allowProvisioningUpdates archive | tee /Users/distiller/project/output/buildlogs/gym/********-********.log | xcpretty\n[09:15:18]: \xe2\x96\xb8 \xe2\x9d\x8c  error: There are no accounts registered with Xcode. Add your developer account to Xcode (in target '********' from project '********')\n[09:15:18]: \xe2\x96\xb8 \xe2\x9d\x8c  error: No profiles for 'com.********.app' were found: Xcode couldn't find any iOS App Development provisioning profiles matching 'com.********.app'. (in target '********' from project '********')\n[09:15:18]: \xe2\x96\xb8 ** ARCHIVE FAILED **\n\n\xe2\x9d\x8c  error: There are no accounts registered with Xcode. Add your developer account to Xcode (in target '********' from project '********')\n\n\n\n\xe2\x9d\x8c  error: No profiles for 'com.********.app' were found: Xcode couldn't find any iOS App Development provisioning profiles matching 'com.********.app'. (in target '********' from project '********')\n\n\n** ARCHIVE FAILED **\n[09:15:18]: Exit status: 65\n[09:15:18]: \n[09:15:18]: Maybe the error shown is caused by using the wrong version of Xcode\n[09:15:18]: Found multiple versions of Xcode in '/Applications/'\n[09:15:18]: Make sure you selected the right version for your project\n[09:15:18]: This build process was executed using '/Applications/Xcode-11.GM.Seed.2.app'\n[09:15:18]: If you want to update your Xcode path, either\n[09:15:18]: \n[09:15:18]: - Specify the Xcode version in your Fastfile\n[09:15:18]: \xe2\x96\xb8 xcversion(version: "8.1") # Selects Xcode 8.1.0\n[09:15:18]: \n[09:15:18]: - Specify an absolute path to your Xcode installation in your Fastfile\n[09:15:18]: \xe2\x96\xb8 xcode_select "/Applications/Xcode8.app"\n[09:15:18]: \n[09:15:18]: - Manually update the path using\n[09:15:18]: \xe2\x96\xb8 sudo xcode-select -s /Applications/Xcode.app\n[09:15:18]: \n\n+---------------+--------------------------------------+\n|                  Build environment                   |\n+---------------+--------------------------------------+\n| xcode_path    | /Applications/Xcode-11.GM.Seed.2.app |\n| gym_version   | 2.190.0                              |\n| export_method | ad-hoc                               |\n| sdk           | iPhoneOS13.0.sdk                     |\n+---------------+--------------------------------------+\n\n[09:15:18]: \xe2\x96\xb8 note: Using new build system\n[09:15:18]: \xe2\x96\xb8 note: Planning build\n[09:15:18]: \xe2\x96\xb8 note: Constructing build description\n[09:15:18]: \xe2\x96\xb8 error: There are no accounts registered with Xcode. Add your developer account to Xcode (in target '********' from project '********')