简体   繁体   English

由于 xcodebuild 命令中的 CODE_SIGN_IDENTITY,CircleCI 构建失败

[英]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.

相关问题 xcodebuild 构建命令在 Xcode 11.5 中失败 - xcodebuild build command fails in Xcode 11.5 xcodebuild代码签名错误:未找到匹配的代码签名身份: - xcodebuild Code Sign error: No matching codesigning identity found: xcodebuild 存档在 CircleCI 上失败,退出状态为 65 - xcodebuild archive fails with exit status 65 on CircleCI xcodebuild 构建命令在 Xcode 11.4 中失败,但在 Xcode 11.3 中失败 - xcodebuild build command fails in Xcode 11.4 but not in Xcode 11.3 遇到内部错误运行命令:错误:由于xcodebuild失败而无法启动WebDriverAgent:“ xcodebuild失败,代码为70” - Encountered internal error running command: Error: Unable to launch WebDriverAgent because of xcodebuild failure: “xcodebuild failed with code 70” xcodebuild返回代码签名错误 - xcodebuild returning code sign error 错误构建平台之一:错误代码65,命令:带有args的xcodebuild:-xcconfig | Cordova插件购买构建失败 - ERROR building one of the platforms: Error code 65 for command: xcodebuild with args: -xcconfig | cordova-plugin-purchase build fails ** 构建失败 ** ... 错误:命令的错误代码 65:带有 args 的 xcodebuild:-xcconfig - ** BUILD FAILED ** … Error: Error code 65 for command: xcodebuild with args: -xcconfig Cordova Build failed with error Error code 65 for command xcodebuild with args - Cordova Build failed with error Error code 65 for command xcodebuild with args 离子 Cordova 构建以 xcodebuild 结束:命令失败,退出代码 65 - Ionic Cordova Build Ending With xcodebuild: Command failed with exit code 65
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM