xcode 允许 codesign 使用我的钥匙串时遇到问题
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/33667704/
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
Having issue with allowing codesign to use my keychain
提问by Mc.Lover
I am using El Capitan
and Xcode 7.1 , I am trying to build and archive my application to upload to app store . After compiling this alert pops up :
我正在使用El Capitan
Xcode 7.1,我正在尝试构建和存档我的应用程序以上传到应用程序商店。编译后弹出此警报:
but Always Allow
and Allow
buttons do not work at all ,but Deny
cancels the alert! how should I fix this issue ? I am using new iMac and transferred all data from my older mac to this new one . This issue even happens with Safari
, when a website wants to access password from keychain .
但是Always Allow
和Allow
按钮根本不起作用,但会Deny
取消警报!我应该如何解决这个问题?我正在使用新的 iMac 并将所有数据从旧的 mac 传输到这个新的。Safari
当网站想要从钥匙串访问密码时,甚至会发生此问题。
This is console log :
这是控制台日志:
SecurityAgent[1476]: Ignoring user action since the dialog has received events from an untrusted source
SecurityAgent[1476]:忽略用户操作,因为对话已从不受信任的来源接收到事件
I have looked into this questionbut I am not sharing anything !
我已经研究过这个问题,但我没有分享任何东西!
回答by Mc.Lover
Found the solution :
找到解决办法:
Third-party utilities such as Alfred, TextExpander, or MagicPrefs might appear to take "control" of the window as far as the OS is concerned. You can find the culprit by disabling them all, and turning them on one by one until you find one (or more) which affects Keychain in that manner. Credit : https://apple.stackexchange.com/questions/212622/keychain-wont-let-copy-passwords-after-10-11-1-update
就操作系统而言,诸如 Alfred、TextExpander 或 MagicPrefs 之类的第三方实用程序似乎可以“控制”窗口。您可以通过禁用它们来找到罪魁祸首,然后将它们一个一个地打开,直到找到一个(或多个)以这种方式影响钥匙串。信用:https: //apple.stackexchange.com/questions/212622/keychain-wont-let-copy-passwords-after-10-11-1-update
In my case I just uninstalled MagicPrefapplication and the problem solved
就我而言,我刚刚卸载了MagicPref应用程序,问题就解决了
回答by Owen Pragel
Not sure if you already figured this out but I faced this exact issue the other day. Is your Xcode build box remote? Is ARD/VNC enabled? Apple recently released an update for CVE-2015-5943 'A malicious application can programmatically control keychain access prompts' that made it so the always allow/allow buttons didn't work is VNC/ARD is used. The other thing that can cause that error to come up is apps that modify system input like Smoothmouse or MagicPrefs.
不确定您是否已经想通了这一点,但前几天我遇到了这个确切的问题。您的 Xcode 构建盒是远程的吗?是否启用了 ARD/VNC?Apple 最近发布了针对 CVE-2015-5943“恶意应用程序可以以编程方式控制钥匙串访问提示”的更新,因此使用 VNC/ARD 时始终允许/允许按钮不起作用。可能导致该错误出现的另一件事是修改系统输入的应用程序,如 Smoothmouse 或 MagicPrefs。
You can get around this by re-importing the private key and trusting the codesign binary on import. If you don't have the original private key .p12 file, you may be able to export it from your Keychain. You'll want to remove the private key from the keychain before reimporting (make sure you have the private key backed up somewhere first!!).
您可以通过重新导入私钥并在导入时信任 codesign 二进制文件来解决此问题。如果您没有原始私钥 .p12 文件,您可以将其从您的钥匙串中导出。在重新导入之前,您需要从钥匙串中删除私钥(确保您先将私钥备份在某处!!)。
To import and trust the codesign binary, you can use this command.
要导入和信任 codesign 二进制文件,您可以使用此命令。
security import /tmp/my-cert-path.p12 -k /Users /xcodeuser/Library/Keychains/login.keychain -P mysupercoolprivatekeypassword -T /usr/bin/codesign
If you need to keep adding trusted apps to the private key, I would definitely make sure to keep your developer private keys backed up elsewhere from here on out. If you lose the private key and cannot export from Keychain Access, think you may need to regenerate it if you don't have local access to the box (we use a remote hosted Mac Mini).
如果您需要不断向私钥添加受信任的应用程序,我肯定会确保从现在开始将您的开发者私钥备份到其他地方。如果您丢失了私钥并且无法从 Keychain Access 导出,如果您没有本地访问权限,则认为您可能需要重新生成它(我们使用远程托管的 Mac Mini)。
The log entry you posted is the correct one.
您发布的日志条目是正确的。
SecurityAgent[1476]: Ignoring user action since the dialog has received events from an untrusted source
'About the security content of OS X El Capitan 10.11.1, Security Update 2015-004 Yosemite, and Security Update 2015-007 Mavericks' https://support.apple.com/en-us/HT205375
“关于 OS X El Capitan 10.11.1、安全更新 2015-004 Yosemite 和安全更新 2015-007 Mavericks 的安全内容” https://support.apple.com/en-us/HT205375
Other folks facing same issue:
其他人面临同样的问题:
El Capitan + Xcode 7.1 not letting me allow enterprise signing
El Capitan + Xcode 7.1 不允许我允许企业签名
回答by Nshweky
I had the same issue, and I looked for a really long time. I actually found this answer while having a similar issue on a pop up box on Microsoft word that wouldn't work.
我有同样的问题,我找了很长时间。我实际上找到了这个答案,同时在 Microsoft word 的弹出框中遇到了类似的问题,但它不起作用。
The fix that I used is to restart the computer and power it on in safe mode (https://support.apple.com/en-us/HT201262), open up Xcode (you may need to install components), and try Archiving it again. This time, when you click always allow, it should work.
我使用的修复方法是重新启动计算机并在安全模式下打开电源(https://support.apple.com/en-us/HT201262),打开 Xcode(您可能需要安装组件),然后尝试存档再说一遍。这一次,当您单击始终允许时,它应该可以工作。
Hope this helps!
希望这可以帮助!