Xcode 4 - 重新安装我删除的钥匙串证书
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/5264481/
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 4 -reinstalls keychain certs that I delete
提问by Codezy
I am getting this error:
我收到此错误:
CodeSign error: Certificate identity 'iPhone Developer: XXX' appears more than once in the keychain. The codesign tool requires there only be one.
CodeSign 错误:证书身份“iPhone 开发人员:XXX”在钥匙串中出现不止一次。协同设计工具只需要一个。
At first I though, no worries, I will just go into keychain and delete the duplicate (older) one, which I did. I went back, closed Xcode, reopened Xcode and project, same error. wtf I though to myself. Back into keychain and the cert is there again. I delete both certs, repeat, and notice as the project loads, the two certs I deleted pop back into the keychain.
起初我虽然,不用担心,我会进入钥匙串并删除重复的(旧的)一个,我就是这样做的。我回去,关闭 Xcode,重新打开 Xcode 和项目,同样的错误。wtf 我虽然对自己。回到钥匙串,证书又出现了。我删除了两个证书,重复,并注意到随着项目加载,我删除的两个证书弹回到钥匙串中。
After much searching, I ensured I did not have the cert in the system keychain, which I did not. Also did a clean and rebuild. When I had duplicates with Xcode 3 I could just clean up the keychain duplicate and I was good. But with Xcode 4 it literally just reinstalls them somehow when I open the project. I even deleted all .cer files on my system that it might possibly be pulling them from.
经过多次搜索,我确保我没有系统钥匙串中的证书,而我没有。还做了清理和重建。当我在 Xcode 3 中有重复项时,我可以清理钥匙串重复项,我很好。但是使用 Xcode 4,当我打开项目时,它实际上只是以某种方式重新安装它们。我什至删除了我系统上可能从中提取它们的所有 .cer 文件。
Any suggestions?
有什么建议?
回答by Codezy
The solution was to go into organizer - under library - provisioning profiles, delete all of them and then reinstall any profiles I still needed.
解决方案是进入组织者 - 在库下 - 配置配置文件,删除所有配置文件,然后重新安装我仍然需要的任何配置文件。
回答by Jagu
I had this same problem and the solutions above did not solve my problem (well nearly).
我遇到了同样的问题,上面的解决方案并没有解决我的问题(几乎)。
I had the same duplicate developer ID/certificate that everyone is complaining about, and I tried deleting all my profiles, revoking/reissuing my cert, making sure there were none in the system keychain, restarting, etc etc.
我有每个人都在抱怨的相同的重复开发人员 ID/证书,我尝试删除我的所有个人资料,撤销/重新颁发我的证书,确保系统钥匙串中没有,重新启动等。
In the end it turned out there wasa certificate in the system keychain, one that had expiredand so was hidden by default in the list.
最后,它竟然有是在系统钥匙串,一个曾经的证书过期,因此被默认列表中隐藏。
Make sure you can see expired certificates in KeyChain
确保您可以在 KeyChain 中看到过期的证书
To do this:
去做这个:
- Open Keychain Access
- Click Viewmenu
- Click Show Expired Certificates
- thenlook for, and delete expired developer certs
- 打开钥匙串访问
- 点击查看菜单
- 单击显示过期证书
- 然后查找并删除过期的开发者证书
回答by Cyprian
Xcode 4 has a new feature "Automatic Device Provisioning". It's located in the organizer under library/provisioning profiles. If you have this enabled it will automatically download your provisioning profiles from the apple developer provisioning server and thus you get the error of having duplicates. The easiest way to fix it is to delete all provisioning profiles and press refresh for the "Automatic Device Provisioning". This will load your provisioning profiles from the server and will fix your problem.
Xcode 4 有一个新功能“自动设备配置”。它位于库/供应配置文件下的组织者中。如果您启用了此功能,它将自动从苹果开发人员配置服务器下载您的配置文件,因此您会收到重复的错误。修复它的最简单方法是删除所有配置文件,然后按“自动设备配置”刷新。这将从服务器加载您的配置文件并解决您的问题。
回答by felis
if you want to mess with keychain access to remove the expired certificate, you may try this:
如果你想用钥匙串访问来删除过期的证书,你可以试试这个:
- create a new keychain, name it "expired" and move ONLYthe expired certificate to it.
- delete the newly created "expired" keychain which contains ONLYthe expired certificate, when asked select "Delete references & files".
- 创建一个新的钥匙串,将其命名为“过期”并仅将过期的证书移动到其中。
- 删除新创建的仅包含过期证书的“过期”钥匙串,当询问时选择“删除引用和文件”。
the expired certificate disappears together with the keychain. worked perfectly for me.
过期的证书与钥匙串一起消失。非常适合我。
回答by Mr. Ming
- Remove all Provisioning Profiles from XCode Organizer;
- Remove old Developer Certificates from Keychain Access;
- Generate Provisioning Profiles with the correct Developer Certificate only;
- Download and install the new Provisioning Profiles;
- 从 XCode Organizer 中删除所有配置文件;
- 从钥匙串访问中删除旧的开发人员证书;
- 仅使用正确的开发人员证书生成配置文件;
- 下载并安装新的配置文件;
-- EDIT --
- 编辑 -
Merge @Codezy's answer and @iphone007's comment.
合并@Codezy 的回答和@iphone007 的评论。
回答by Kenial
Deleting provisioning profiles in Organizer's library, additionally, you should delete iPhone developer certificate in Keychain Access. (The certificate's name is probably like "iPhone Developer: XXXXX ..." and indicated by red X sign, as expired)
删除 Organizer 库中的配置文件,此外,您应该删除 Keychain Access 中的 iPhone 开发人员证书。(证书的名称可能类似于“iPhone Developer: XXXXX ...”,并以红色 X 符号表示,表示已过期)
回答by Stan
I spent for this a half-day and finally found the solution
我为此花了半天终于找到了解决方案
- Open KeyChain Access.app
- Select "System" in "Keychains" menu on the left part of Keychain application screen
- Select "Certificates" in "Category" down menu
- Remove all old certifications.
- 打开 KeyChain Access.app
- 在钥匙串应用程序屏幕左侧的“钥匙串”菜单中选择“系统”
- 在“类别”下拉菜单中选择“证书”
- 删除所有旧认证。
Then close Keychain.app and go to Xcode -> Organizer
然后关闭 Keychain.app 并转到 Xcode -> Organizer
- Remove all Provisioning Profiles in Library menu
- Remove all Provisioning Profiles in Devices menu
- Push "Refresh" button in Library menu -> Provisioning Profile
- Add needful profiles to your device
- 删除库菜单中的所有配置文件
- 删除设备菜单中的所有配置文件
- 按“库”菜单中的“刷新”按钮 -> 配置文件
- 将必要的配置文件添加到您的设备
Build again your app:)
再次构建您的应用程序:)
回答by John Caplinger
Figured out a really easy way to fix this in 4.6.1. You can do it without restarting anything or deleting any profiles!
在 4.6.1 中想出了一个非常简单的方法来解决这个问题。您无需重新启动任何内容或删除任何配置文件即可完成此操作!
With Keychain Access and your Xcode project open:
使用 Keychain Access 和您的 Xcode 项目打开:
- In Xcode, open Organizer - "Devices" and select the "team" with the duplicate certificate.
- Switch to Keychain Access and delete the old duplicate certificate(s). Note: Make sure you turn on "show expired certificates" to not miss any.
- The certificates will have disappeared from the "team" profile in the Xcode Organizer.
- Clean project and build.
- 在 Xcode 中,打开 Organizer - “Devices”并选择带有重复证书的“team”。
- 切换到 Keychain Access 并删除旧的重复证书。注意:确保打开“显示过期的证书”以免错过任何一个。
- 证书将从 Xcode 管理器中的“团队”配置文件中消失。
- 清理项目并构建。
Hope it helps!
希望能帮助到你!
回答by Bryan
For posterity, here's the strategy to get around this problem in our automated build script:
对于后代,以下是在我们的自动构建脚本中解决此问题的策略:
- Before building, move the ~/Library/MobileDevices/Provisioning Profilesdirectory aside
- Check to see if the iPhone Configuration Utilityis running and close it (certs always reappear if this app is open. In XCode 4.1 you need to close the organizer too.)
- Run you build
- Move the Provisioning Profilesdirectory back
- Profit?
- 在构建之前,将~/Library/MobileDevices/Provisioning Profiles目录移到一边
- 检查iPhone 配置实用程序是否正在运行并关闭它(如果此应用程序打开,证书总是会重新出现。在 XCode 4.1 中,您也需要关闭管理器。)
- 运行你构建
- 将Provisioning Profiles目录移回
- 利润?
回答by nh7a
I've tried everything suggested here but nothing worked for me except reinstaling XCode 4.3 magically solved the case.
我已经尝试了这里建议的所有内容,但除了重新安装 XCode 4.3 神奇地解决了这个问题之外,没有任何效果。