首页 > 解决方案 > Jenkins 或远程登录上的 Fastlane 错误 65

问题描述

我知道这是已知问题,并且尝试了几次答案,但这次我发现了我觉得很奇怪的情况。日志告诉可怕的错误 65以及errSecInternalComponent何时对第一个 Pod 进行代码签名。

在构建之前,我已将security unlock-keychain命令包含在 shell 脚本中。

捆绑更新
导出 FASTLANE_DISABLE_COLORS=1
导出 APP_IDENTIFIER=com.example.MyApp
security unlock-keychain -p topsecret ~/Library/Keychains/codesign.keychain && bundle exec fastlane appstore

我也尝试过其他巫术,比如用钥匙串做其他魔法

当直接在 CI 服务器控制台(或通过远程桌面)上运行时,它运行完美,不会提示输入用户密码等。我想知道有什么区别?

Fastlane 版本为2.106.0(最新)。

执行 Embed Pods 框架时,构建失败,就像其他用户一样:

▸ 运行脚本 '[CP] Embed Pods Frameworks'
** 存档失败 **


以下构建命令失败:
PhaseScriptExecution [CP]\ Embed\ Pods\ Frameworks /Users/ci/Library/Developer/Xcode/DerivedData/BackOffice-gprttmucbsbjiifnxdulcnwierfb/Build/Intermediates.noindex/ArchiveIntermediates/BackOffice_AppStore/IntermediateBuildFilesPath/BackOffice.build/Release-iphoneos/BackOffice.build /Script-7E4F6707694226143D2E7E0B.sh
(1 次失败)
[15:59:39]:退出状态:65

+---------------+--------------+
| 搭建环境 |
+---------------+--------------+
| xcode_path | /应用程序/Xcode.app |
| 健身房版本 | 2.106.2 |
| 导出方法 | 应用商店 |
| sdk | iPhoneOS11.4.sdk |
+---------------+--------------+

[15:59:39]:▸ 总大小为 481485,加速为 1.00
[15:59:39]:▸ 代码签名/Users/ci/Library/Developer/Xcode/DerivedData/BackOffice-gprttmucbsbjiifnxdulcnwierfb/Build/Intermediates.noindex/ArchiveIntermediates/BackOffice_AppStore/InstallationBuildProductsLocation/Applications//BackOffice.app/Frameworks/ACEExpandableTextCell .framework with Identity iPhone Distribution: MyCompany Inc. (XXXXXXXXXX)
[15:59:39]: ▸ /usr/bin/codesign --force --sign CB480CDBA0169C56DA9597D6941095F254D89B3B --preserve-metadata=identifier,entitlements '/Users/ci/Library/Developer/Xcode/DerivedData/BackOffice-gprttmucbsbjiifnxdulcnwierfb/Build /Intermediates.noindex/ArchiveIntermediates/BackOffice_AppStore/InstallationBuildProductsLocation/Applications//BackOffice.app/Frameworks/ACEExpandableTextCell.framework'
[15:59:39]:▸ /Users/ci/Library/Developer/Xcode/DerivedData/BackOffice-gprttmucbsbjiifnxdulcnwierfb/Build/Intermediates.noindex/ArchiveIntermediates/BackOffice_AppStore/InstallationBuildProductsLocation/Applications//BackOffice.app/Frameworks/ACEExpandableTextCell.framework : errSecInternalComponent
[15:59:39]:▸ 命令 /bin/sh 失败,退出代码为 1

标签: iosfastlane

解决方案


我在我的 Jenkins 服务器上遇到了同样的问题。为了修复它,我在匹配操作中使用了以下标志

keychain_password: "my_Mac_Password"

一旦我能够让它工作一次,我就把它拿出来了。

如果您不使用 match,您也可以尝试unlock_keychain操作。


推荐阅读