重复弹出:Xcode 想要访问钥匙串中的密钥“com.apple.dt.XcodeDeviceMonitor”
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/40144668/
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
Repeated Popup: Xcode wants to access key "com.apple.dt.XcodeDeviceMonitor" in your keychain
提问by Andrew Schreiber
Starting in MacOS Sierra, I've started to get this popup periodically from XCode, even after pressing 'Always Allow'.
从 MacOS Sierra 开始,我开始定期从 XCode 获取此弹出窗口,即使在按下“始终允许”之后也是如此。
I've tried deleting the "com.apple.dt.XcodeDeviceMonitor" item in Keychain. This regenerates the key, but doesn't fix the issue.
我试过删除钥匙串中的“com.apple.dt.XcodeDeviceMonitor”项目。这会重新生成密钥,但不能解决问题。
It's an open discussion topic on the Apple forums, but no one seems to have a solution.
这是 Apple论坛上的一个公开讨论主题,但似乎没有人有解决方案。
回答by malhal
Posting this solution for Xcode 8 because no one else has:
为 Xcode 8 发布此解决方案,因为没有其他人拥有:
- Open Keychain Access.
- Search for XcodeDeviceMonitor.
- Drag the item to the System Keychain on left.
- Enter admin password.
- 打开钥匙串访问。
- 搜索 XcodeDeviceMonitor。
- 将项目拖到左侧的系统钥匙串中。
- 输入管理员密码。
That finally fixes it.
这终于修复了它。
回答by Linc
open [keychain access] > type "xcode" in the search area > double click [com.apple.dt.XcodeDeviceMonitor] > click [access control] > select the first option [allow all applications to access this item]
打开[钥匙串访问]>在搜索区域输入“ xcode”>双击[ com.apple.dt.XcodeDeviceMonitor]>点击[访问控制]>选择第一个选项[允许所有应用程序访问此项]
Don't forget to click Save Changes!
不要忘记单击保存更改!
hope it helps.
希望能帮助到你。
回答by peegee123
The following worked for me (running macOS 10.12.1 and XCode 7.3).
以下对我有用(运行 macOS 10.12.1 和 XCode 7.3)。
Note that the problem with other solutions is that they operate on the (temporary) login keychain entry, which is removed when XCode quits, so a solution appears to be to create the entry in the System keychain instead.
请注意,其他解决方案的问题在于它们对(临时)登录钥匙串条目进行操作,该条目在 XCode 退出时被删除,因此解决方案似乎是在系统钥匙串中创建条目。
I tried using Keychain Access to move the entry from the login to the System keychain but it failed with various obscure errors (e.g. "An error has occurred. Unable to add an item to the current keychain")
我尝试使用钥匙串访问将条目从登录移动到系统钥匙串,但它因各种模糊错误而失败(例如“发生错误。无法将项目添加到当前钥匙串”)
Instead, I used the security command to create a new entry in the System keychain that's (almost) identical to the temporary one.
相反,我使用 security 命令在 System 钥匙串中创建一个新条目,该条目(几乎)与临时条目相同。
The only difference is the password which I couldn't be bothered to extract (and I'm unsure whether it's important).
唯一的区别是我懒得提取的密码(我不确定它是否重要)。
Open Terminal, paste and execute the following command (after suitable editing if XCode isn't in the normal location):
打开终端,粘贴并执行以下命令(如果 XCode 不在正常位置,则适当编辑后):
sudo security add-generic-password \
-s 'com.apple.dt.XcodeDeviceMonitor' \
-a session-token \
-p anyoldstring \
-T /Applications/Xcode.app \
-T /Applications/Xcode.app/Contents/Developer/Library/Xcode/Tools/XcodeDeviceMonitor \
/Library/Keychains/System.keychain
Disclaimer - my sole objective here was to prevent the annoying alert.
I've no idea whether this will break anything.
You're messing with the System keychain: what could possibly go wrong ?
免责声明 - 我在这里的唯一目标是防止烦人的警报。
我不知道这是否会破坏任何东西。
你搞乱了系统钥匙串:可能出什么问题了?
回答by Easiwriter
I reported this to Apple as a bug and after several suggestions the same as some of those mentioned here that didn't work they came back with the following, which has worked:
我将此作为错误报告给 Apple,经过与这里提到的一些建议相同的一些建议后,他们返回了以下内容,该建议有效:
"Sorry about the trouble. We'll dig a bit more into this. In the mean time, if you don't need the iCloud gauge, you can temporarily disable it by doing this:
“抱歉给您带来麻烦。我们将对此进行深入研究。同时,如果您不需要 iCloud 仪表,您可以通过以下方式暂时禁用它:
- Go to Terminal.app.
- Type this in to enable an User Defaults
defaults write com.apple.dt.Xcode iCloudGaugeDisabled -bool YES - Relaunch Xcode "
- 转到 Terminal.app。
- 键入此内容以启用 User Defaults
defaults write com.apple.dt.Xcode iCloudGaugeDisabled -bool YES - 重新启动Xcode“
回答by johnrechd
This issue has popped up again for me this past fall. I think the issue may stem from the security hole that apple had where the root user account was left un password protected. I reset my password for the root user account (to the same password as it was previously). I didn't notice the relationship at the time, but after reading this support item, I suspected that this could be the issue.
这个问题在去年秋天再次出现在我身上。我认为这个问题可能源于苹果在 root 用户帐户未受密码保护的情况下存在的安全漏洞。我重置了 root 用户帐户的密码(与以前的密码相同)。我当时没有注意到这种关系,但在阅读了这个支持项目后,我怀疑这可能是问题所在。
https://support.apple.com/en-us/HT201609
https://support.apple.com/en-us/HT201609
I reset my password for the login keychain (again to the same password) following these steps and the issue has since gone away.
我按照这些步骤重置了登录钥匙串的密码(再次设置为相同的密码),此后问题就消失了。
Hope this helps.
希望这可以帮助。