Xcode 5 持续集成 CodeSign 失败
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/21858672/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
Xcode 5 continuous integration CodeSign fail
提问by Sam Rodstin
Hi there. I'm trying to configure continuous integration for my iOS app with xcode 5 and OS X Server. I added certificates and p12 to system KeyChain, I also copied provisioning profiles to server folder for profiles. Integration fails and log shows error message
你好呀。我正在尝试使用 xcode 5 和 OS X Server 为我的 iOS 应用程序配置持续集成。我将证书和 p12 添加到系统 KeyChain,我还将配置文件复制到配置文件的服务器文件夹。集成失败并且日志显示错误消息
Short message:
短消息:
Command /usr/bin/codesign failed with exit code 1
命令 /usr/bin/codedesign 失败,退出代码为 1
Full message:
完整信息:
CodeSign /Library/Server/Xcode/Data/BotRuns/Cache/c60acccd-d128-d128-b0e3-070a65bdd9dc/DerivedData/Build/Intermediates/ArchiveIntermediates/MomentSeller/InstallationBuildProductsLocation/Applications/MomentSeller.app cd /Library/Server/Xcode/Data/BotRuns/Cache/c60acccd-d128-d128-b0e3-070a65bdd9dc/source/Moment setenv CODESIGN_ALLOCATE /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/codesign_allocate setenv PATH "/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin:/Applications/Xcode.app/Contents/Developer/usr/bin:/usr/bin:/bin:/usr/sbin:/sbin" Using code signing identity "iPhone Distribution: Company Name. (ZX6C5SJYP9)" and provisioning profile "Moment Seller Production" (E6FC8157-98F3-4A28-BFF3-36EFA6334019) codesign --force --sign C2F81E886780437B90630A748111D3340DC8EFC8 --resource-rules=/Library/Server/Xcode/Data/BotRuns/Cache/c60acccd-d128-d128-b0e3-070a65bdd9dc/DerivedData/Build/Intermediates/ArchiveIntermediates/MomentSeller/InstallationBuildProductsLocation/Applications/MomentSeller.app/ResourceRules.plist --entitlements /Library/Server/Xcode/Data/BotRuns/Cache/c60acccd-d128-d128-b0e3-070a65bdd9dc/DerivedData/Build/Intermediates/ArchiveIntermediates/MomentSeller/IntermediateBuildFilesPath/Moment.build/Release-iphoneos/MomentSeller.build/MomentSeller.xcent /Library/Server/Xcode/Data/BotRuns/Cache/c60acccd-d128-d128-b0e3-070a65bdd9dc/DerivedData/Build/Intermediates/ArchiveIntermediates/MomentSeller/InstallationBuildProductsLocation/Applications/MomentSeller.app /Library/Server/Xcode/Data/BotRuns/Cache/c60acccd-d128-d128-b0e3-070a65bdd9dc/DerivedData/Build/Intermediates/ArchiveIntermediates/MomentSeller/InstallationBuildProductsLocation/Applications/MomentSeller.app: User interaction is not allowed. Command /usr/bin/codesign failed with exit code 1
** ARCHIVE FAILED **
The following build commands failed: CodeSign /Library/Server/Xcode/Data/BotRuns/Cache/c60acccd-d128-d128-b0e3-070a65bdd9dc/DerivedData/Build/Intermediates/ArchiveIntermediates/MomentSeller/InstallationBuildProductsLocation/Applications/MomentSeller.app (1 failure)
app /Library/Server/Xcode/Data/BotRuns/Cache/c60acccd-d128-d128-b0e3-070a65bdd9dc/DerivedData/Build/Intermediates/ArchiveIntermediates/MomentSeller/InstallationBuildProductsLocation/Applications/MomentSeller.app:不允许用户交互。命令 /usr/bin/codesign 失败,退出代码为 1
** 存档失败 **
以下构建命令失败:CodeSign /Library/Server/Xcode/Data/BotRuns/Cache/c60acccd-d128-d128-b0e3-070a65bdd9dc/DerivedData/Build/Intermediates/ArchiveIntermediates/MomentSeller/InstallationBuildProductsLocation/Applications/Moment1 failureSeller. )
Any ideas? Thanks.
有任何想法吗?谢谢。
回答by jervine10
I've run into this problem myself. This blog helped me out. http://matt.vlasach.com/xcode-bots-hosted-git-repositories-and-automated-testflight-builds/
我自己也遇到过这个问题。这个博客帮助了我。http://matt.vlasach.com/xcode-bots-hosted-git-repositories-and-automated-testflight-builds/
As posted by Dominik Kroutvar:
正如多米尼克·克鲁特瓦 (Dominik Kroutvar) 发表的那样:
User interaction is not allowed. Command /usr/bin/codesign failed with exit code 1
This error happens when the following setting is not made manually. As described in one of the posts above you have to put the mobileprofile for code signing in the system keychain. The certificate is called iPhone Distribution:. This distribution certificate must have a private key! Open the Settings dialog either by double click on the private key or through the context menu>Get Info. Then go to Access control and put /usr/bin/codesign in the table. This allows the codesign application to sign your built application. After that everything should work without the meaningless codesign error exit code 1.
不允许用户交互。命令 /usr/bin/codedesign 失败,退出代码为 1
未手动进行以下设置时会发生此错误。如上面的一篇文章所述,您必须将用于代码签名的移动配置文件放入系统钥匙串中。该证书称为 iPhone Distribution:。这个分发证书必须有私钥!通过双击私钥或通过上下文菜单>获取信息打开设置对话框。然后转到访问控制并将 /usr/bin/codesign 放在表中。这允许协同设计应用程序对您构建的应用程序进行签名。之后,一切都应该正常工作,而没有无意义的协同设计错误退出代码 1。
回答by Danny Schoemann
As already statedyou simply need to run security -v unlock-keychain -p "$KEYCHAIN_PASSWORD" "$KEYCHAIN"
.
如前所述,您只需要运行security -v unlock-keychain -p "$KEYCHAIN_PASSWORD" "$KEYCHAIN"
.
Run this before the build and the codesign succeeds.
在构建和协同设计成功之前运行它。