Xcode - iPhone - 配置文件与默认钥匙串中的任何有效证书/私钥对都不匹配
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/5391786/
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 - iPhone - profile doesn't match any valid certificate-/private-key pair in the default keychain
提问by Kevin Glier
I tried to add my iPhone to Xcode4 to test my Application on it. I added the device in the Apple Developer-Center and downloaded the Provision-Profile. We pay 99$ per month for the account and I'm not the only person who use this account. So there is already an "older" certificate present which I tried to add to my keychain-manager. But I see a red-text above it (translated from german) "This certificate has been signed by an unknown instance.".
我试图将我的 iPhone 添加到 Xcode4 来测试我的应用程序。我在 Apple Developer-Center 中添加了该设备并下载了 Provision-Profile。我们每月为该帐户支付 99 美元,而且我不是唯一使用该帐户的人。所以已经有一个“旧”证书存在,我试图将其添加到我的钥匙串管理器中。但是我看到它上面有一个红色文本(从德语翻译)“此证书已由未知实例签名。”。
In my XCode-Device Manager in the Provisioning-Section there's also an error: "XCode could not find a valid private-key/certificate pair for this profile in your keychain."
在配置部分的 XCode 设备管理器中,也有一个错误:“XCode 无法在您的钥匙串中找到此配置文件的有效私钥/证书对。”
I really don't understand what I have to do now. These keys may really not exist in my keychain, I can't find them. So how I have to create them know and how can I use them if there is already one certificate in the Apple Dev-Center?
我真的不明白我现在必须做什么。这些钥匙可能真的不存在于我的钥匙串中,我找不到它们。那么我必须知道如何创建它们,如果 Apple Dev-Center 中已经有一个证书,我该如何使用它们?
采纳答案by Ludovic Landry
To generate a certificate on the Apple provisioning profile website, firstly you have to generate keys on your mac, then upload the public key. Apple will generate your certificates with this key. When you download your certificates, tu be able to use them you need to have the private key.
要在 Apple 配置文件网站上生成证书,首先您必须在 Mac 上生成密钥,然后上传公钥。Apple 将使用此密钥生成您的证书。当您下载证书时,您需要拥有私钥才能使用它们。
The error "XCode could not find a valid private-key/certificate pair for this profile in your keychain." means you don't have the private key.
错误“XCode 无法在您的钥匙串中找到此配置文件的有效私钥/证书对。” 意味着您没有私钥。
Maybe because your Mac was reinstalled, maybe because this key was generated on another Mac. So to be able to use your certificates, you need to find this key and install it on the keychain.
也许是因为你的 Mac 重新安装了,也许是因为这个密钥是在另一台 Mac 上生成的。因此,为了能够使用您的证书,您需要找到此密钥并将其安装在钥匙串上。
If you can not find it you can generate new keys restart this process on the provisioning profile website and get new certificates you will able to use.
如果您找不到它,您可以生成新密钥,在配置文件网站上重新启动此过程,并获取您将能够使用的新证书。
回答by supermoogle
My problem was my Target profile didn't have the proper code signing option selected:
我的问题是我的目标配置文件没有选择正确的代码签名选项:
Target Menu -> Code Signing -> Code Signing Identity
目标菜单 -> 代码签名 -> 代码签名标识
Choose "iPhone developer" then select the provisional profile you created.
选择“iPhone 开发人员”,然后选择您创建的临时配置文件。
回答by borisgolovnev
This also can happen if the device you are trying to run on has some older version of the provisioning profile you are using that points to an old, expired or revoked certificate or a certificate without associated private key. Delete any invalid Provisioning Profiles under your device section in Xcode organizer.
如果您尝试运行的设备具有您正在使用的一些旧版本的配置文件,该版本指向旧的、过期或撤销的证书或没有关联私钥的证书,也会发生这种情况。删除 Xcode 管理器中设备部分下的所有无效配置文件。
回答by James Testa
When I tried to select the development provisioning profile in Code Signing Identity is would say "profile doesn't match any valid certificate". So when I followed the two step process below it worked:
当我尝试在 Code Signing Identity 中选择开发配置文件时,会说“配置文件与任何有效证书不匹配”。因此,当我遵循下面的两步过程时,它起作用了:
1) Under "Code Signing Identity" for Development change to "Don't Code Sign".
2) Then Under "Code Signing Identity" for Development you will be able to select your provisioning profile for Development.
1) 在用于开发的“代码签名标识”下更改为“不要代码签名”。
2) 然后在用于开发的“代码签名身份”下,您将能够选择用于开发的配置文件。
Drove me nuts, but stumbled upon the solution.
把我逼疯了,但偶然发现了解决方案。
回答by mmattke
I had a similar situation: multiple developers using the same private key, but I couldn't find mine anymore after upgrade to Lion. The very simple fix was to export the private key for the specific certificate (in my case the Development cert) from the other machine, move it to my computer and drag it into keychain access there. Xcode immediately picked it up and I was good to go.
我遇到过类似的情况:多个开发人员使用相同的私钥,但升级到 Lion 后我再也找不到我的了。非常简单的修复方法是从另一台机器导出特定证书(在我的情况下是开发证书)的私钥,将其移动到我的计算机并将其拖到那里的钥匙串访问中。Xcode 立即拿起它,我很高兴去。
回答by Ravi
your Apple developer certificate might have expired or else ur system date is greater than your account expiry date
您的 Apple 开发者证书可能已过期,或者您的系统日期大于您的帐户到期日期