简体   繁体   English

使用自定义钥匙串生成时,APNS证书缺少私钥

[英]APNs certificate missing private key when generating with custom keychain

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. 我试图在构建服务器上为我的应用生成一个新的APNs证书,但是当我进入证书和私钥的“导出2个项目”步骤时,我发现我没有两个项目。 My certificate didn't have any private key with it. 我的证书没有任何私钥。

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 . 我可以在钥匙串中看到证书属于系统钥匙串,而公钥和私钥在我的CI-Jenkins钥匙串中

I repeated the process on my development machine and it worked fine there. 我在我的开发机器上重复了该过程,在那儿工作得很好。

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

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? 在生成证书之前,我是否需要交换钥匙串,然后再在构建服务器上交换回来?

The solution is to just drag the certificate from the System keychain to the login keychain. 解决方案是将证书从System钥匙串拖到login钥匙串。 Then it will automatically associate the correct private key with it. 然后它将自动将正确的私钥与其关联。

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

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