ios iPhone 应用签名:在您的钥匙串中找不到与此配置文件匹配的有效签名身份
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/999313/
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
iPhone app signing: A valid signing identity matching this profile could not be found in your keychain
提问by Ben Reeves
I'm pulling my hair out over this. I just downloaded the iPhone 3.0 SDK
, but now I can't get my provisioning profiles to work. Here is what I have tried:
我正在为此拔头发。我刚刚下载了iPhone 3.0 SDK
,但现在我无法让我的配置文件工作。这是我尝试过的:
- Delete all provisioning profiles
- Delete login keychain
- Create new "login" keychain, make it default
- Create a new certificate signing request
- Create new developer and distribution certificates in the Apple developer center
- Download and install them
- Download the WWDR certificate and install it
- Create a new provisioning profile and double click it to install
- 删除所有配置文件
- 删除登录钥匙串
- 创建新的“登录”钥匙串,将其设为默认值
- 创建新的证书签名请求
- 在 Apple 开发者中心创建新的开发者和分发证书
- 下载并安装它们
- 下载 WWDR 证书并安装
- 创建一个新的配置文件并双击它进行安装
All the certificates report as valid, but Xcode
still won't recognize them. What should I try next?
所有证书都报告为有效,但Xcode
仍然无法识别它们。我接下来应该尝试什么?
Edit:
编辑:
I completely re-installed Mac OS X
and from a fresh install installed the 3.0 SDK
and still have the same problem.
我完全重新安装Mac OS X
并从全新安装安装3.0 SDK
,仍然有同样的问题。
采纳答案by Valerii Hiora
Had the same problem yesterday. Now, after signing to the developer portal, for every invalid provisioning profile have a button "Renew". After renewing and downloading updated provisioning profile all seems to work as expected, so problem is definitely solved :)
昨天有同样的问题。现在,在登录开发人员门户后,对于每个无效的配置文件,都有一个“续订”按钮。更新和下载更新的配置文件后,一切似乎都按预期工作,所以问题肯定解决了:)
Update: you may have to contact Apple to get a "Renew"-button, or they removed it -- and the solution is to just download it and add it to the keychain, no need to renew.
更新:您可能需要联系 Apple 以获取“续订”按钮,或者他们将其删除——解决方案是下载它并将其添加到钥匙串中,无需续订。
回答by Louie
I had the same problem: I first downloaded my certificates to my small MacBook while on the run. When trying to install the certificates on my iMac... then I ran into the problems described on this page.
我遇到了同样的问题:我在跑步时首先将我的证书下载到我的小型 MacBook 上。尝试在我的 iMac 上安装证书时……然后我遇到了此页面上描述的问题。
After spending hours pulling my hair out like many of you, I performed the following steps to fix it:
像你们中的许多人一样花了几个小时拉我的头发后,我执行了以下步骤来修复它:
Close all your stuff except your webpage that should be logged into App Dev center.
Open Xcode. Click WINDOW > ORGANIZER. Then click the Devices tab and select "Provisioning Profiles" on the left. That should bring up your provisioning profiles. Highlight one by one (if more than 1), right click and delete profile. Yes, just do it! Delete them all! (I kept making a new one after a new one trying to make the thing work.)
From the first page you see after logging into the App Dev Center on the right side click "iOS PROVISIONING PORTAL" > (do not "launch assistant"). Instead click on the left side. Select CERTIFICATES. You will probably have just one line listed with your name/company - from there click on the right side REVOKE. Click OK to verify that's what you want to do.
On the same page click DEVICES. Click the box next to your device you are trying to provision and click REMOVE SELECTED. Again click OK to verify.
Wait about 2 minutes to let Apple do their thing.
Now click on "HOME" that is on the left side navigation.
Click "Launch Assistant"
create a new app ID - call it whatever you want. Just make sure it's unique enough to know that's the one you just created because the others you've been messing with all day will not be deleted from Apples Dev Center.
You should be able to follow the rest of the Assistant without troubles -- the main thing is you just had to delete your old provision profiles and start over.
关闭除应登录到应用开发中心的网页之外的所有内容。
打开 Xcode。单击窗口 > 组织者。然后单击设备选项卡并选择左侧的“配置文件”。这应该会显示您的配置文件。一一突出显示(如果超过 1 个),右键单击并删除配置文件。是的,就去做吧!全部删除!(我不断地制作一个新的,试图让这件事发挥作用。)
从右侧登录App Dev Center后看到的第一页点击“iOS PROVISIONING PORTAL”>(不要“启动助手”)。而是单击左侧。选择证书。您可能只会列出一行您的姓名/公司 - 从那里单击右侧的 REVOKE。单击“确定”以验证这就是您要执行的操作。
在同一页面上单击设备。单击您尝试配置的设备旁边的框,然后单击删除所选。再次单击“确定”进行验证。
等待大约 2 分钟,让 Apple 做他们的事情。
现在点击左侧导航栏中的“主页”。
点击“启动助手”
创建一个新的应用程序 ID - 随意命名。只要确保它足够独特,就可以知道那是您刚刚创建的那个,因为您整天弄乱的其他人不会从 Apple 开发中心删除。
您应该能够毫无困难地跟随助手的其余部分 - 主要是您只需删除旧的配置文件并重新开始。
Good Luck!
祝你好运!
回答by Rome Li
I encountered the same issue. This is because the private key of the certificate does not existing on your machine.
我遇到了同样的问题。这是因为证书的私钥在您的机器上不存在。
If you are now using a new machine and download the certificate from website: You can export the certificate from the old machine and then import on the new machine.
If you share the developer account with someone: You ask the account owner to send you an invitation and become a team member of that account. Then you can create your own certificate from scratch.
If you don't want to handle all these sh*t: Just revoke the certificate on website and delete the copy on your local machine. Then request a new one. This should be the ultimate way for solving such issue.
如果您现在使用新机器并从网站下载证书:您可以从旧机器导出证书,然后在新机器上导入。
如果您与某人共享开发者帐户:您要求帐户所有者向您发送邀请并成为该帐户的团队成员。然后,您可以从头开始创建自己的证书。
如果您不想处理所有这些 sh*t:只需撤销网站上的证书并删除本地计算机上的副本即可。然后请求一个新的。这应该是解决此类问题的最终方法。
回答by MoDJ
What I found was that I needed to drag the distribution_identity.cer file that I downloaded from the "Certificates -> Distribution" page on the developer program portal into the keychain access program, then this error went away.
我发现我需要将我从开发人员程序门户上的“证书->分发”页面下载的distribution_identity.cer文件拖到钥匙串访问程序中,然后这个错误就消失了。
回答by prasad
I solved it by
我解决了
a) go to provisioning profile page on the portal
a) 转到门户上的配置文件页面
b) Click on Edit on the provisioning profile you are having trouble (right hand side).
b) 在您遇到问题的配置文件(右侧)上单击编辑。
c) Check the Appropriate Certificate box (not checked by default) and select the correct App ID (my old one was expired)
c) 选中适当的证书框(默认情况下未选中)并选择正确的 App ID(我的旧的已过期)
d) Download and use the new provisioning profile. Delete the old one(s).
d) 下载并使用新的配置文件。删除旧的。
Apparentlythere are 4 different causes of this problem:
显然,此问题有 4 个不同的原因:
- Your Keychain is missing the private key associated with your iPhone Developer or iPhone Distribution certificate.
- Your Keychain is missing the Apple Worldwide Developer Relations Intermediate Certificate.
- Your certificate was revoked or has expired.
- Online Certificate Status Protocol (OCSP) or Certificate Revocation List (CRL) are turned on in Keychain Access preferences
- 您的钥匙串缺少与您的 iPhone 开发人员或 iPhone 分发证书关联的私钥。
- 您的钥匙串缺少 Apple 全球开发者关系中级证书。
- 您的证书已被吊销或已过期。
- 在线证书状态协议 (OCSP) 或证书吊销列表 (CRL) 在钥匙串访问首选项中打开
.
.
回答by Taimur Ajmal
After carefully going through the thread here and checking all the solutions proposed by people, I can confidently claim this, after following the steps mentioned on Apple developer docs for creating CSR and mobile provision file, just do this!,
在仔细浏览这里的线程并检查人们提出的所有解决方案后,我可以自信地声称这一点,按照 Apple 开发人员文档中提到的步骤创建 CSR 和移动配置文件后,只需执行此操作!,
- Launch Xcode.
- Select window->Organizer
- Click this refresh button and that filthy yellow bar will remove instantly.
- 启动 Xcode。
- 选择窗口->组织者
- 单击此刷新按钮,肮脏的黄色条将立即删除。
http://img.skitch.com/20100820-1ngm8an14c6fm3dt7g6j51d2nx.jpg
http://img.skitch.com/20100820-1ngm8an14c6fm3dt7g6j51d2nx.jpg
Trust me, you onlyhave to do this. There is no need to repeat the process again and again to make sure that you doing it the right way. Just press Refresh, enter your login credentials and it's done.
相信我,你只需要这样做。无需一次又一次地重复该过程以确保您以正确的方式进行操作。只需按刷新,输入您的登录凭据即可完成。
回答by Karsten Silz
For me it only worked when the certificate and both keys were in the Loginkeychain. I had created a Developmentkeychain before, but the Xcode Organizer wouldn't find the keys in there. So I moved them back to Login, quit the keychain tool - and voila, the error in Xcode Organizer went away! This was on Snow Leopard 10.6.2 with the 3.1.3 SDK.
对我来说,它只在证书和两个密钥都在登录钥匙串中时才有效。我之前创建了一个开发钥匙串,但是 Xcode Organizer 不会在那里找到钥匙。所以我将它们移回Login,退出钥匙串工具 - 瞧,Xcode Organizer 中的错误消失了!这是在带有 3.1.3 SDK 的 Snow Leopard 10.6.2 上。
回答by marchinram
For development certificates you can just create a new one and match it to a profile. However for distribution, like when your going to submit to Apple, you cannot do this and must use the distribution certificate the team agent created. The problem is you need the private key on your machine. It's very simple, however, for the team agent who created the certificate to copy the private key to you, below are the instructions from Apple, I hope this helps.
对于开发证书,您只需创建一个新证书并将其与配置文件匹配即可。但是对于分发,就像您要提交给 Apple 时一样,您不能这样做,必须使用团队代理创建的分发证书。问题是您需要机器上的私钥。这很简单,但是,对于创建证书的团队代理将私钥复制给您,以下是Apple的说明,希望对您有所帮助。
It is critical that you save your private key somewhere safe in the event that you need to develop on multiple computers or decide to reinstall your system OS. Without your private key, you will be unable to sign binaries in Xcodeand test your application on any Apple device. When a CSR is generated, the Keychain Access application creates a private key on your login keychain. This private key is tied to your user account and cannot be reproduced if lost due to an OS reinstall. If you plan to do development and testing on multiple systems, you will need to import your private key onto all of the systems you'll be doing work on.
如果您需要在多台计算机上开发或决定重新安装系统操作系统,请将您的私钥保存在安全的地方至关重要。如果没有您的私钥,您将无法在 Xcode 中签署二进制文件并在任何 Apple 设备上测试您的应用程序。生成 CSR 后,钥匙串访问应用程序会在您的登录钥匙串上创建一个私钥。此私钥与您的用户帐户相关联,如果因操作系统重新安装而丢失,则无法复制。如果您计划在多个系统上进行开发和测试,则需要将您的私钥导入到您将要进行工作的所有系统上。
- To export your private key and certificate for safe-keeping and for enabling development on multiple systems, open up the Keychain Access Application and select the ‘Keys' category.
- Control-Click on the private key associated with your iPhone Development Certificate and click ‘Export Items' in the menu. The private key is identified by the iPhone Developer: public certificate that is paired with it.
- Save your key in the Personal Information Exchange (.p12) file format.
- You will be prompted to create a password which is used when you attempt to import this key on another computer.
- You can now transfer this .p12 file between systems. Double-click on the .p12 to install it on a system. You will be prompted for the password you entered in Step 4.
- 要导出您的私钥和证书以进行安全保存并支持在多个系统上进行开发,请打开钥匙串访问应用程序并选择“密钥”类别。
- 按住 Control 单击与您的 iPhone 开发证书关联的私钥,然后单击菜单中的“导出项目”。私钥由 iPhone 开发人员识别:与其配对的公共证书。
- 以个人信息交换 (.p12) 文件格式保存您的密钥。
- 系统将提示您创建一个密码,当您尝试在另一台计算机上导入此密钥时使用该密码。
- 您现在可以在系统之间传输此 .p12 文件。双击 .p12 将其安装到系统上。系统将提示您输入在步骤 4 中输入的密码。
回答by marchinram
The best answer I got was exporting your key, instead of just trying to import the cert file.
我得到的最佳答案是导出您的密钥,而不仅仅是尝试导入证书文件。
When you export the key from the keychain that generated the request, you get a Certificates.p12 file, which rolls the keys you need together.
当您从生成请求的钥匙串导出密钥时,您将获得一个 Certificates.p12 文件,该文件将您需要的密钥滚动到一起。
Then import this into the new computer.
然后将其导入新计算机。
With keys like this, it's probably good to keep a rolled, certificate package file, because many times the "public" key, or cert file, is not enough to restore things from.
使用这样的密钥,最好保留一个滚动的证书包文件,因为很多时候“公共”密钥或证书文件不足以从中恢复内容。
回答by marchinram
In my case, I copied the project from my iMac to my Macbook Pro and found out I didn't have my private key installed on the Macbook. So I exported my private key, copied and installed it to the Macbook, and voila it works! I've documented the information here: http://www.creatistblog.com/2009/09/iphone-developer-provisioning.html
就我而言,我将项目从 iMac 复制到我的 Macbook Pro,发现我没有在 Macbook 上安装我的私钥。所以我导出了我的私钥,将其复制并安装到 Macbook,瞧它工作正常!我在这里记录了信息:http: //www.creatistblog.com/2009/09/iphone-developer-provisioning.html