ios Xcode 不断要求输入密码才能使用系统钥匙串
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/10068566/
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 keeps asking for password to use the System Keychain
提问by neowinston
I'm running Xcode 4.3.2, under Lion 10.7.3, but every time I'm installing my iPhone app on the device it keeps asking me for an Admin user name and password.
我在 Lion 10.7.3 下运行 Xcode 4.3.2,但每次我在设备上安装我的 iPhone 应用程序时,它一直要求我提供管理员用户名和密码。
I've done everything suggested here, and even have reinstalled Xcode:
我已经完成了这里建议的所有操作,甚至重新安装了 Xcode:
Another StackOverflow related question
But without success so far.
但至今没有成功。
Here is a picture of the window that is appearing all the time:
这是一直出现的窗口的图片:
Any other suggestions on how to solve this problem?
关于如何解决这个问题的任何其他建议?
回答by neowinston
The problem was that my Developer Certificate on Keychain was under "System", on the left hand panel, which is always locked, requiring my password to unlock!
问题是我在钥匙串上的开发人员证书在左侧面板上的“系统”下,它总是被锁定,需要我的密码才能解锁!
Then I moved the Developer Certificate to "login", which is always unlocked, and now everything works perfectly. The annoyance of xCode asking for the password is gone.
然后我将开发者证书移到“登录”,它始终处于解锁状态,现在一切正常。xCode 要求输入密码的烦恼消失了。
Please see this picture for more details:
请查看此图片了解更多详情:
回答by zszen
- Go to "Keychain Access"
- Double click the Private Key under the certificate use to code sign your App
- Add "Xcode" to "Always allows these applications:" under the "Access Control" section list.
- 转到“钥匙串访问”
- 双击证书下的私钥,用于对您的应用程序进行代码签名
- 在“访问控制”部分列表下将“Xcode”添加到“始终允许这些应用程序:” 。
回答by A.G
Here is how I fixed it on Xcode 7.2 (also works in 7.3):
这是我在 Xcode 7.2 上修复它的方法(也适用于 7.3):
- Open KeyChain.
- Select System, Choose Certificates category.
- Select developer certificate and double click the private key.
- Check Access Control and tick on 'Allow all item to access this'.
- Restart Xcode and run the app on device.
- 打开钥匙串。
- 选择系统,选择证书类别。
- 选择开发者证书并双击私钥。
- 检查访问控制并勾选“允许所有项目访问此”。
- 重新启动 Xcode 并在设备上运行应用程序。
回答by Kampai
I did follow this to resolve above problem:
我确实按照这个来解决上述问题:
Go to Keychain Access
Select System >>Your certificate >>Right click "Get Info"
Certificate information window will open >>Select "Trust"section
From drop down option select "Always Trust"
转到钥匙串访问
选择系统>>您的证书>>右键单击“获取信息”
证书信息窗口将打开>>选择“信任”部分
从下拉选项中选择“始终信任”
回答by Muhammad Naeem Paracha
Hopefully these steps solve your problem.
希望这些步骤可以解决您的问题。
- Open Keychain Access.
- In the top-left corner, unlock the keychain (if it is locked).
- Choose the System keychain from the top-left corner.
- Find your distribution certificate and click the disclosure triangle.
- Double-click ‘Private key' under your distribution certificate.
- In the popup, go to the Access Control tab.
- Select ‘Allow all applications to access this item'.
- Save the changes.
- Close all windows.
- Run the application.
- 打开钥匙串访问。
- 在左上角,解锁钥匙串(如果已锁定)。
- 从左上角选择系统钥匙串。
- 找到您的分发证书并单击披露三角形。
- 双击分发证书下的“私钥”。
- 在弹出窗口中,转到访问控制选项卡。
- 选择“允许所有应用程序访问此项目”。
- 保存更改。
- 关闭所有窗口。
- 运行应用程序。
回答by Yulia
In my case the required certificate with private key was saved in Systemkeychain, Certificatescategory. To fix the problem I've exported the certificate (including the private key), and moved it to loginkeychain, Certificatescategory.
在我的情况下,所需的带有私钥的证书保存在系统钥匙串,证书类别中。为了解决这个问题,我导出了证书(包括私钥),并将其移动到登录钥匙串,证书类别。