Jenkins 或远程登录上的 Fastlane 错误 65

Tom*_*ner 5 ios fastlane

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

  • 在 Jenkins 上运行时,我的构建失败
  • 在 CI 机器上手动运行,通过 SSH 登录并执行时bundle exec fastlane appstore,它失败
  • 当我登录远程桌面或物理访问 CI 机器时,构建SUCCEEDS

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 Frameworks 时,构建会像其他用户一样失败:

? 运行脚本'[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. /Script-7E4F6707694226143D2E7E0B.sh
(1 次失败)
[15:59:39]:退出状态:65

+---------------+-------------------------+
| 搭建环境 |
+---------------+-------------------------+
| xcode_path | /应用程序/Xcode.app |
| 健身房_版本| 2.106.2 |
| export_method | 应用商店|
| 开发工具包| 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 . (XXXXXXXXXX)
[15:59:39]:?/usr/bin/codesign --force --sign CB480CDBA0169C56DA9597D6941095F254D89B3B --preserve-metadata=identifier,entitlements '/Users/ci/Library/Developer/Xcode/DerivedData/BackOffice-gprttmucbsbjifnindex/BuildingIntermediate/Applieds/安装BuildProductsLocation/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:errSecIn
[15:59:39]:?命令 /bin/sh 失败,退出代码为 1

Fra*_*eau 1

我的詹金斯服务器上也有同样的问题。为了解决这个问题,我在比赛操作中使用了以下标志

keychain_password: "my_Mac_Password"
Run Code Online (Sandbox Code Playgroud)

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

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