“此 Mac 上未安装...的私钥”——Xcode 中的分发和配置文件
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/20015069/
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
"The private key for ... is not installed on this Mac" – distribution and provisioning profiles in Xcode
提问by matthewpalmer
I've tried looking at the other answers for this but there's a lot of incomplete or conflicting information, but if you have a good link that would be great.
我试过查看其他答案,但有很多不完整或相互矛盾的信息,但如果你有一个很好的链接,那就太好了。
When I try to distribute my app I get this error:
当我尝试分发我的应用程序时,出现此错误:
I've tried creating a new distribution profile from Certificates, Identifiers & Profiles at developer.apple.com, but none of these seem to work.
我已经尝试从 developer.apple.com 上的证书、标识符和配置文件创建一个新的分发配置文件,但这些似乎都不起作用。
I have a Time Machine backup from before I did a clean install of Mavericks to upgrade, and I also have a code saved to a text file in my Dropbox (I'm not sure if it's a private key – I doubt it) which looks like 'df9a79...' around thirty characters long.
在我对 Mavericks 进行全新安装进行升级之前,我有一个 Time Machine 备份,而且我还有一个代码保存到我的 Dropbox 中的文本文件中(我不确定它是否是私钥 - 我怀疑它)看起来像“df9a79...”大约三十个字符长。
I just can't seem to find the right link to guide me through the entire process of key creation, iTunes connect and developer.apple.com. I've done this before – I'm currently just trying to submit an update to the App Store.
我似乎无法找到正确的链接来指导我完成密钥创建、iTunes 连接和 developer.apple.com 的整个过程。我以前这样做过——我目前只是尝试向 App Store 提交更新。
My app update status is currently Waiting For Upload.
我的应用程序更新状态目前为等待上传。
Here is my Keychain:
这是我的钥匙扣:
I've tried removing duplicates (e.g. those in the first screenshot), but that didn't seem to help. If you have any suggestions or links I'd love to hear them.
我试过删除重复项(例如第一个屏幕截图中的那些),但这似乎没有帮助。如果您有任何建议或链接,我很想听听。
Thanks for your help.
谢谢你的帮助。
回答by spaleja
In your keychain, there are two keys named 'Matthew Palmer'. Those two entries for the same name can be conflicting. Try by removing those both and install it again.
在您的钥匙串中,有两个名为“ Matthew Palmer”的钥匙。同名的这两个条目可能会发生冲突。尝试删除它们并重新安装。
回答by Parvendra Singh
I hope you make a Distribution Provising Certificate
at developer.apple.com.
我希望你能Distribution Provising Certificate
在 developer.apple.com 上做一个。
Chose that profile there , if you are not, create that, first you need to create that certificate before proceeding.
在那里选择该配置文件,如果不是,请创建该配置文件,首先您需要在继续之前创建该证书。
回答by Ben Golding
I had this problem and eventually realised that I'd originally installed my provisioning certificate on another machine. The private key was only on that machine, and there was only a public key on my new machine. I needed to install my private key on my new machine so I could sign my app and submit it.
我遇到了这个问题,并最终意识到我最初是在另一台机器上安装了我的配置证书。私钥只在那台机器上,而我的新机器上只有公钥。我需要在我的新机器上安装我的私钥,以便我可以签署我的应用程序并提交它。
On my original machine, I went to Xcode>Preferences>Accounts and used "Export accounts" (under the cog) to save a copy of my accounts. I transferred the generated .developerprofile to my other machine and dropped it on Xcode there. That installed the private key for the provisioning profile on that machine and I was able to submit my app.
在我原来的机器上,我转到 Xcode>Preferences>Accounts 并使用“Export accounts”(在 cog 下)来保存我的账户副本。我将生成的 .developerprofile 转移到我的另一台机器上,然后将它放在 Xcode 上。在那台机器上安装了配置文件的私钥,我能够提交我的应用程序。
回答by fionaom
Another resolution to this is restart Xcode. I had the same issue after creating a new provisioning profile, and after restarting Xcode I no longer had the issue.
对此的另一个解决方案是重新启动 Xcode。创建新的配置文件后,我遇到了同样的问题,重新启动 Xcode 后,我不再遇到这个问题。
回答by Graham Dawson
After experiencing this error, I tried submitting to the app store via Application Loader, signing the app with my AdHoc certificate instead of the app store certificate, as that one didn't generate the same error.
遇到此错误后,我尝试通过 Application Loader 提交到应用程序商店,使用我的 AdHoc 证书而不是应用程序商店证书对应用程序进行签名,因为该证书没有生成相同的错误。
The submission was accepted by Apple with no validation errors.
提交被 Apple 接受,没有验证错误。
This is a temporary workaround, but it may be helpful if you need a quick submission.
这是一种临时解决方法,但如果您需要快速提交,它可能会有所帮助。