使用自定义钥匙串生成时,APNs 证书缺少私钥 [英] APNs certificate missing private key when generating with custom keychain

查看:23
本文介绍了使用自定义钥匙串生成时,APNs 证书缺少私钥的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我试图在我们的构建服务器上为我的应用程序生成一个新的 APNs 证书,但是当我进入证书和私有的导出 2 个项目"步骤时关键,我发现我没有两个项目.我的证书没有任何私钥.

I was trying to generate a new APNs certificate for my app on our build server but when I got to the "Export 2 items" step for the Certificate and Private Key, I found that I didn’t have two items. My certificate didn’t have any private key with it.

我可以在我的钥匙串中看到证书属于系统钥匙串,而公钥和私钥在我的 CI-Jenkins 钥匙串中.

I can see in my keychain that the certificate belongs to the System keychain whilst the public and private key are in my CI-Jenkins keychain.

我在我的开发机器上重复了这个过程,并且在那里运行良好.

I repeated the process on my development machine and it worked fine there.

唯一的区别是构建服务器当前设置为使用我们的自定义 CI-Jenkins 钥匙串,而不是默认的登录钥匙串.

The only difference being that the build server is currently set to use our custom CI-Jenkins keychain as opposed to the default login keychain.

有谁知道那里发生了什么,是否有道理?我是否需要在生成证书之前交换钥匙串,然后再交换回我的构建服务器?

Anybody knows what is happening there and if it makes sense? Do I need to swap keychain before generating the certificate and then swap back on my build server?

推荐答案

解决方案是将证书从 System 钥匙串拖到 login 钥匙串.然后它会自动关联正确的私钥.

The solution is to just drag the certificate from the System keychain to the login keychain. Then it will automatically associate the correct private key with it.

这篇关于使用自定义钥匙串生成时,APNs 证书缺少私钥的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆