简体   繁体   English

使用jenkins xcode构建插件构建时出现代码签名错误

[英]Code Sign error when building using jenkins xcode build plugin

I get the following error when using the XCodeBuild plugin of jenkins: 使用jenkins的XCodeBuild插件时出现以下错误:

Code Sign error: The identity 'iPhone Developer' doesn't match any valid, non-expired certificate/private key pair in your keychains 代码签名错误:身份'iPhone Developer'与您的钥匙串中任何有效的,未过期的证书/私钥对不匹配

Update: I am able to xcodebuild from terminal and build in xcode to simulator and to device however not when running it in jenkins - jenkins seems to have some different 'shared' osx user because its home folder is in users/shared? 更新:我能够从终端xcodebuild并在xcode中构建模拟器和设备,但是当在jenkins中运行它时 - jenkins似乎有一些不同的'共享'osx用户,因为它的主文件夹在users / shared中?

By default when Jenkins is installed it runs as a daemon as opposed to a process under your current user. 默认情况下,安装Jenkins时,它作为守护进程运行,而不是当前用户下的进程。 As such it does not have access to any of your credentials which are needed to code sign your app. 因此,它无法访问您的应用程序代码签名所需的任何凭据。

Instead of running Jenkins as a daemon, you should just launch it like a normal process. 不要将Jenkins作为守护进程运行,而应该像普通进程一样启动它。 It would probably looks like something like this: 它可能看起来像这样:

java -jar /Applications/Jenkins/jenkins.war

您正在使用的构建计算机没有与临时配置文件中的证书匹配的私钥。

I also run jenkins as a daemon and code signing works fine using the plugin: 我还运行jenkins作为守护进程,使用插件进行代码签名工作正常:

https://wiki.jenkins-ci.org/display/JENKINS/Keychains+and+Provisioning+Profiles+Plugin https://wiki.jenkins-ci.org/display/JENKINS/Keychains+and+Provisioning+Profiles+Plugin

(Jenkins 2.19.1 with Xcode 8) (Jenkins 2.19.1与Xcode 8)

It's not the build machine, but the user doing the build. 它不是构建机器,而是构建用户的用户。 He's missing those certificate and private key. 他错过了那些证书和私钥。 You need to manually add a login.keychain especially for him. 您需要手动添加login.keychain特别适合他。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM