[英]CircleCI build fails because of CODE_SIGN_IDENTITY in xcodebuild command
I have inherited a project that uses Fastlane and CircleCI to generate builds.我继承了一个使用 Fastlane 和 CircleCI 生成构建的项目。 It has been broken for a while but I managed to get most of it working again.
它已经坏了一段时间,但我设法让它大部分再次工作。 However the actual build keeps failing on the build server, locally all of my lanes already finish successfully.
但是,实际构建在构建服务器上一直失败,在本地我的所有通道都已成功完成。
I've been comparing what happens locally versus on the CI server and the difference seems to be in the way Circle archives the project.我一直在比较本地和 CI 服务器上发生的情况,不同之处似乎在于 Circle 归档项目的方式。 I've changed it so it will run locally and the errors remain the same:
我已对其进行了更改,因此它将在本地运行并且错误保持不变:
xcodebuild -workspace ./App.xcworkspace -scheme App -configuration AdHoc -destination generic/platform=iOS -archivePath "/Users/me/Library/Developer/Xcode/Archives/2020-08-14/App 2020-08-14 13.08.37.xcarchive" archive "CODE_SIGN_IDENTITY=iPhone Distribution: ACME"
Results in:结果是:
error: No certificate for team '123ABC4DEF' matching 'iPhone Distribution: ACME' found: Select a different signing certificate for CODE_SIGN_IDENTITY, a team that matches your selected certificate, or switch to automatic provisioning. (in target '***********-SomeLibrary' from project '***********')
It looks like it wants to sign not only the main application using the CODE_SIGN_IDENTITY
, expects 'iPhone Distribution: ACME'
to be explicitly there and fails when it doesn't.看起来它不仅想使用
CODE_SIGN_IDENTITY
对主应用程序进行签名,还希望'iPhone Distribution: ACME'
明确存在,如果不存在则失败。
As soon as I remove the CODE_SIGN_IDENTITY
part at the end it starts working locally:一旦我在最后删除
CODE_SIGN_IDENTITY
部分,它就开始在本地工作:
xcodebuild -workspace ./App.xcworkspace -scheme App -configuration AdHoc -destination generic/platform=iOS -archivePath "/Users/me/Library/Developer/Xcode/Archives/2020-08-14/App 2020-08-14 13.08.37.xcarchive" archive"
I've been combing over all of the settings where this might be specified hardcoded but I couldn't find anything.我一直在梳理所有可能指定硬编码的设置,但我找不到任何东西。 GYM_CODE_SIGN_IDENTITY hasn't been added for example.
例如,尚未添加 GYM_CODE_SIGN_IDENTITY。 So how is it possible that it doesn't add that
CODE_SIGN_IDENTITY
flag locally using Fastlane but yes remote on the server?那么它怎么可能不使用 Fastlane 在本地添加
CODE_SIGN_IDENTITY
标志,但在服务器上远程添加呢?
I've found out that it was a variable set up in the configuration of CircleCI:我发现它是在 CircleCI 的配置中设置的变量:
https://app.circleci.com/settings/project/github/[your_org]/[your_app]/environment-variables https://app.circleci.com/settings/project/github/[your_org]/[your_app]/environment-variables
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.