Jenkins Xcode 证书设置错误 Code Sign error: No matching codesigning identity found: No codesigning identities

Jenkins 集成Xcode 项目的时候在证书上遇到了问题。实际上如果在本地的话。只要Xcode工程里选择了项目就不需要重新设置证书了。jenkins会自动找到这个证书,只要在build setting 里设置的是正常的。并且在xcode 里能正常编译。

Check dependencies
Code Sign error: No codesigning identities found: No codesigning identities (i.e. certificate and private key pairs) that match the provisioning profile specified in your build settings (“qingyunDeveloper”) were found.

如果遇到类似的错误 解决办法:首先打开keychain keys 找到apple 的开发者证书。然后复制。 再选择左边的系统(system)把刚复制的证书放进去。如果这个还没有解决。接下来第二步:找到你用户下的Provisioning Profiles 文件。目录为 /Users/xxx/Library/MobileDevice/Provisioning Profiles  xxx表示你自己的用户名
把这里面所有的证书复制到/Users/Shared/Jenkins/Library/MobileDevice/Provisioning Profile   这个文件。

最后提示
iPhone.build/ProjectCos.xcent /Users/chenqing/Sqy/iOSProject/cyou/Svn/Cos/CosXCode_lxh/build/ProjectCos.app

** BUILD SUCCEEDED **

Finished: SUCCESS

参考资料:
http://code-dojo.blogspot.co.uk/2012/09/fix-ios-code-signing-issue-when-using.html

Fix the iOS code signing issue when using Jenkins

This week I setup the Jenkins on my Mac and try to build iOS applications. unfortunately I got the code signing issues, either I use xcode plugin or xcode command line tool. Through a couple days of googling and I could not find any solution that works for me, but I finally solve this issue by myself through different try out, and the solution is such an easy, now I would like to share with my solution.

The core reason is Jenkins is running as daemon mode in Mac, just assume it is a different user - "Jenkins", so it will not have access to the keychain or provision profile as a you login using your credentials, which cause the code signing issue.
I found I have following 2 errors

1. "Code Sign error: There are no valid certificate/private key pairs in the default keychain"
Solution: Copy your iPhone developer certificate from "login" keychain to "System" keychain.
Detailed steps:
  open the "Keychain Access" application, click the login tab, right click the certificate like "iPhone Developer: your_name (XXXXXXX)", choose copy, then click the "System" tab, right click mouse, choose "Paste 2 items"; you might need to do the same thing with the certificate like "iPhone Distribution: your_name".

After doing this, you will get the second error.
2. "Code Sign error: Provisioning profile ‘xxxxx-xxxx-xxxx-xxxxx‘ can‘t be found"
Solution: Copy the provision profile to Jenkins user folder.
The provision profile is under in the folder
/YourUserName/Library/MobileDevice/Provisioning Profiles,
for example in my machine, the provision profile files are under /Users/steve/Library/MobileDevice/Provisioning Profiles
In the mac, the Jenkins will be in /Users/Shared/Jenkins, create the following folder:
/Users/Shared/Jenkins/Library/MobileDevice/Provisioning Profile,  then copy the .mobileprovision file to this folder.

After doing this, the code signing issues will be fixed. Hope my finding will be helpful to other Jenkins users.



, 
时间: 2024-08-05 15:20:59

Jenkins Xcode 证书设置错误 Code Sign error: No matching codesigning identity found: No codesigning identities的相关文章

更新证书错误Code Sign error: Provisioning profile ‘XXXX'can't be found

更新证书错误Code Sign error: Provisioning profile ‘XXXX'can't be found 在Xcode中当你在更新了你得证书而再重新编译你的程序,真机调试一直会出现 Code Sign error: Provisioning profile ‘XXXX’ can't be found是不是会另你很恼火.下面说说解决方法,让你很好的解决这个问题. 1.关闭你的项目,找到项目文件XXXX.xcodeproj,在文件上点击右键,选择“显示包内容”(Show Pa

IOS bug之Code Sign error:Provisioning profile

刚才解决一个版本冲突的bug,记在了博客里,这让我想起了另外一个bug,当时犹豫公司的开发者账号过期了,我打开应用运行时提示Code Sign error:Provisioning profile  'XXXX...' ,百度了好久,最后又问的石头才把问题解决 1.更新证书 2.重新设置参数 今天看博客发现有一个解决方法 具体参考 :http://blog.csdn.net/guo_hongjun1611/article/details/8063009

iOS Code Sign error: Provisioning profile can't be found 解决方案

出现error的过程:在运行另外一个xcode项目重置了code sign,回到原来的项目的时候出现这个error 修复方法: targe-build settings-code signing identity-choose iOS Developer 然后Provision File选择对应的file 参考链接: https://developer.apple.com/legacy/library/documentation/ToolsLanguages/Conceptual/YourFir

Xocde一次版本升级遇到的问题 (Code Sign Error)

因为Xcode对ios版本的支持问题,我对XCode进行了一次升级,导致原来还好的项目代码出现了编译时错误. Code Sign Error failed with exit code 1 问题就在于这次的Xcode升级. 大神支招"分别进入工程目录与DerivedData目录,执行 xattr -rc " 解决. 实际上直接在项目根目录直接运行就行. 遇到问题  在此标记.

iOS Code Sign error: Provisioning profile can't be found 解决方式

出现error的过程:在执行另外一个xcode项目重置了code sign.回到原来的项目的时候出现这个error 修复方法: targe-build settings-code signing identity-choose iOS Developer 然后Provision File选择相应的file 參考链接: https://developer.apple.com/legacy/library/documentation/ToolsLanguages/Conceptual/YourFir

Code Sign Error in macOS Sierra Xcode 8.3.3 - resource fork, Finder information, or similar detritus not allowed

这是iOS 10, macOS Sierra, watchOS 3, 和 tvOS 10带来的安全策略更新.代码签名不再允许应用程序包中的任何文件具有包含资源分叉或查找信息的扩展属性. 通过如下命令行,可以查看那些文件导致了这些问题: $ xattr -lr <path_to_app_bundle> 解决这一问题的方案大致有三个: 1. 删除App的资源文件中所有扩展属性 xattr -cr <path_to_app_bundle> 2. 查找带有finder信息的文件,定向删除

code sign error 1

Xcode8.3 beta 调试: .app: resource fork, Finder information, or similar detritus not allowed 备注:只有模拟器编译时出现这种情况,真机build success 解决方法: 1.终端cd到工程目录,执行"xattr -rc .",这时编译,一般都成功,如果不成功,执行步骤2 2.终端cd到DerivedData目录,执行"xattr -rc ."

Q7:关于xcode证书申请以及真机调试简单版本

iOS发开蛋疼集锦 Write by iceAna Team 1.奔跑吧,App(Running on the device) 前言 App已经受够了一次又一次在Simulator上的调试,它渴望在你的iPhone或者iPad上奔跑! 注:本文建立在以下几个条件,倘若不满足,请跳出本书. 1.你已经付费99$拥有了iOS Developer Program accout. 2.你已经拥有一台或多台调试设备,iPhone,iPad等等. 3.假如你要将你的apps放到iTunes App Stor

新浪微博 IOS sso package or sign error 和 error:redirect_uri_mismatch 错误解决方法

在新浪微博 开发平台 申请一个客户端应用  应用名称和应用地址 可以随便填写 创建之后 除了 要把 BundleId 项 与 你的工程Bundleid 保持一致外 其他随便填写 如果不一致 将导致  sso package or sign error 错误 授权回调页  填写 http://open.weibo.com/apps/APPKey/info/advanced  其中 APPKey 为 你申请到得 appkey 在应用程序中 也要设置这个 重定向地址 即WBAuthorizeReque