ios - Jenkins 或远程登录上的 Fastlane 错误 65
问题描述
我知道这是已知问题,并且尝试了几次答案,但这次我发现了我觉得很奇怪的情况。日志告诉可怕的错误 65以及errSecInternalComponent
何时对第一个 Pod 进行代码签名。
- 在 Jenkins 上运行时,我的构建FAILS。
- 在 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 框架时,构建失败,就像其他用户一样:
▸ 运行脚本 '[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
解决方案
我在我的 Jenkins 服务器上遇到了同样的问题。为了修复它,我在匹配操作中使用了以下标志
keychain_password: "my_Mac_Password"
一旦我能够让它工作一次,我就把它拿出来了。
如果您不使用 match,您也可以尝试unlock_keychain操作。
推荐阅读
- c# - 是否可以从 C# 组件覆盖 Form 的 CreateParams 方法/函数?
- swift - Swift 编程中 ABI 稳定性的问题到底在哪里
- javascript - 如何仅返回数组中匹配/过滤的字符串?
- javascript - vue js 作用域插槽样式错误与 vue 样式组件
- node.js - 为什么(以及如何解决)在使用 moment.js 并将类型作为字符串时,它会“冻结”日期?
- apache-spark - 通过 DataFrames 从配置单元视图与配置单元表读取时的性能考虑
- ruby-on-rails - 在 Ruby on Rails 视图助手中使用 define_method
- google-sheets - Google 表格中的 NORMDIST 给了我一个指数分布
- logging - 尝试将通用 CEF 日志转发到 Azure Sentinel
- php - 检查 Zip 文件是否使用 PHP 加密或密码保护