ios Xcode“此mac上未安装的私钥 - 正在分发”
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/10590356/
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 "The private key for is not installed on this mac - distributing"
提问by Fabian Boulegue
I always get this message when I try to submit my app to the app store.
当我尝试将我的应用程序提交到应用程序商店时,我总是收到此消息。
Here is a picture of the message:
这是消息的图片:
It would be great if someone could help me resolve that problem so I can submit my app to the store.
如果有人能帮我解决这个问题,我就可以将我的应用程序提交到商店,那就太好了。
回答by Ben Visness
Try following these steps:
尝试执行以下步骤:
- Revoke your existing iOS Distribution Certificate from the iOS developer website.
- Generate a new iOS Distribution Certificate by going to XCode Preferences->Accounts->View Details and then clicking the + underneath the list of signing identities.
- Go back to the developer website and make sure all your provisioning profiles are configured with the new certificate. (They should all be listed as Active when you are done.)
- Go back to XCode and refresh your list of provisioning profiles.
- 从 iOS 开发者网站撤销您现有的 iOS 分发证书。
- 通过转到 XCode Preferences->Accounts->View Details,然后单击签名身份列表下方的 +,生成新的 iOS 分发证书。
- 返回开发人员网站并确保您的所有配置文件都配置了新证书。(完成后,它们都应列为“活动”。)
- 返回 XCode 并刷新您的配置文件列表。
I had the same issue as you did and this resolved it just fine.
我和你遇到了同样的问题,这很好地解决了它。
回答by kentrh
This solved it for me without starting all the way from scratch:
1. Open Keychain Access on the machine that was used to generate the private keys
2. Select Keychains->Login and Category->Certificates on the left hand side
3. Locate the two certificates iPhone Developer: [your developer name] and iPhone Distribution: [your developer name]
4. Select both, right click and choose Export 2 items...
5. Enter a password of choice, save to disk and get the .p12-file over to the other machine that won't sign
6. Open the file, enter the password and you should be good to go.
这为我解决了这个问题,无需从头开始:
1. 在用于生成私钥的机器上打开 Keychain Access
2. 在左侧选择 Keychains->Login and Category->Certificates
3. 找到两个证书 iPhone 开发者:[您的开发者名称] 和 iPhone 分发:[您的开发者名称]
4. 选择两者,右键单击并选择导出 2 个项目...
5. 输入选择的密码,保存到磁盘并获取 .p12 -file 到另一台不会签名的机器
6. 打开文件,输入密码,你应该很高兴。
回答by Cue
Having a similar problem, after several days of testing, checking, try to repairing and so on, what worked for me was simply:
遇到了类似的问题,经过几天的测试、检查、尝试修复等,对我有用的只是:
- Open Xcode's preferences (Accounts panel)
- Click on "Manage Certificates".
- Add a new certificate.
- 打开 Xcode 的首选项(帐户面板)
- 单击“管理证书”。
- 添加新证书。
Then everything started working again.
然后一切又开始工作。
回答by SESPROUL
I also experienced this and fought the process for 4 hours. finally i did the following
我也经历了这一点,并在这个过程中奋战了 4 个小时。最后我做了以下
- Deleted all the Private and public keys and certifications in my Keychain Access
- Deleted all Provisioning profiles
- Deleted all AppID's - (Probably didn;t need to do this by I wanted a clean slate)
- Deleted my certifications on the Developer.Apple site
- Created new Wildcard Development Profile
- Created new Profile SPECIFIC to the App that I was deploying (So it had the appname instead of *, in the AppID)
- Created a new development Certificate from the Website.
- Downloaded the intermediate certificate (Worldwide Developer Relations Certificate Authority) since I wiped that off my Keychain too
- Created the Certification Signing Request (CSR), followed the instructions to the letter to add it to my keychain access. and Uploaded the CSR.
- Once the Certification was added, I made sure to rename the public and Private Keys, and added comments to the info box - so I could remember what I did.
- Created a new Distribution Cert by repeating Steps 7,9, 10 for the Distribution so I could get it onto the App Store.
- 删除了所有的私人和公共密钥和证书在我的钥匙串访问
- 删除了所有配置文件
- 删除了所有 AppID -(可能不需要;因为我想要一个干净的石板)
- 删除了我在 Developer.Apple 网站上的认证
- 创建新的通配符开发配置文件
- 为我正在部署的应用程序创建了新的 Profile SPECIFIC(因此它在 AppID 中有应用程序名称而不是 *)
- 从网站创建了一个新的开发证书。
- 下载了中间证书(全球开发者关系证书颁发机构),因为我也把它从我的钥匙串上擦掉了
- 创建了认证签名请求 (CSR),按照信函的说明将其添加到我的钥匙串访问中。并上传了 CSR。
- 添加认证后,我确保重命名公钥和私钥,并在信息框中添加注释 - 这样我就可以记住我做了什么。
- 通过为分发重复步骤 7、9、10 来创建一个新的分发证书,以便我可以将它放到 App Store 上。
Hopefiully this helps someone to know that you can wipe everything out and start over. I loaded all the certs on an olf Macbook Pro that started flaking out last week. So I got a new Mac Air last week, but Icouldn;t remember what keys, and I certainly didn't remember I had 2 sets of Private and Public one for the Development, and 1 for the Distribution. (If you have more that 1 distribution, I believe you would have additional sets.)
希望这可以帮助某人知道您可以清除所有内容并重新开始。我在上周开始脱落的 olf Macbook Pro 上加载了所有证书。所以我上周买了一台新的 Mac Air,但我不记得是什么键,我当然不记得我有 2 套私有和公共的用于开发,还有 1 套用于分发。(如果您有超过 1 个发行版,我相信您会有额外的套装。)
Steve
史蒂夫
回答by Alex Nolasco
Ran into the same issue and after cursing at Apple , I realized it was my fault.
遇到了同样的问题,在诅咒 Apple 之后,我意识到这是我的错。
1.- Go to developer.apple.com / Certificates / Production
2.- Download your certificate
This worked for me thank after trying other answers.
在尝试其他答案后,这对我有用。
回答by ThomasW
回答by Fluffhead
It is worth checking in Keychain Access to make sure you don't have multiple keys with the same name. Also, very often when I have run into Code Signing issues, the fastes solution has been to start the process over (create new keypairs, certs and provisioning profiles).
值得检查钥匙串访问以确保您没有多个具有相同名称的钥匙。此外,很多时候当我遇到代码签名问题时,快速的解决方案是重新开始这个过程(创建新的密钥对、证书和配置文件)。
Best of luck!
祝你好运!
回答by Jim
It seems that you have got as far as generating a distribution certificate, so you must have generated a key pair at some point. Do you develop on multiple machines? Export the developer profile from the machine that has it and import it into this machine.
似乎您已经获得了生成分发证书的能力,因此您一定在某个时候生成了一个密钥对。你在多台机器上开发吗?从拥有它的机器导出开发人员配置文件并将其导入本机。
回答by Atul Manwar
It's simple, login to the user's account (maybe on different mac) which was used to create the distribution certificate. Open Keychain Access and export their private key. Then install it to your Keychain.
很简单,登录到用于创建分发证书的用户帐户(可能在不同的 mac 上)。打开钥匙串访问并导出他们的私钥。然后将其安装到您的钥匙串中。
回答by zprag
My problem was Xcode was not on the Access control list for the private key. You can fix this in the keychain access without generating a new key pair.
我的问题是 Xcode 不在私钥的访问控制列表中。您可以在钥匙串访问中修复此问题,而无需生成新的密钥对。
Open keychain access. On the left side select login and My Certificates. Select your distribution certificate and double click your private key. Select access control and add Xcode to the list if its not there.
打开钥匙串访问。在左侧选择登录和我的证书。选择您的分发证书并双击您的私钥。选择访问控制并将 Xcode 添加到列表中(如果它不存在)。
Restart Xcode and make a new archive. It should find the private key now.
重新启动 Xcode 并创建一个新存档。它现在应该找到私钥。