xcode Mac OS X 在编译项目时想使用系统钥匙串

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/10204320/
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

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-09-09 04:22:44  来源:igfitidea点击:

Mac OS X wants to use system keychain when compiling the project

xcodekeychain

提问by Singh

I am asked to type in the system admin user name and password when I compile my Xcode project. The whole message is

当我编译我的 Xcode 项目时,我被要求输入系统管理员用户名和密码。整个信息是

Mac OS X wants to make changes. Type an administrator's name and password to allow this. Mac OS X wants to use system keychain.

Mac OS X 想要做出改变。键入管理员的名称和密码以允许此操作。Mac OS X 想要使用系统钥匙串。

Does anyone have a solution for this?

有没有人对此有解决方案?

采纳答案by Singh

I found that problem to be of provisioning profiles. I deleted all previous provisioning profiles and then reinstalled one I needed.

我发现问题出在配置文件上。我删除了所有以前的配置文件,然后重新安装了我需要的配置文件。

回答by PVCS

  1. Open Keychain Access.
  2. In the top-left corner, unlock the keychain (if it is locked).
  3. Choose the System keychain from the top-left corner.
  4. Find your distribution certificate and click the disclosure triangle.
  5. Double-click ‘Private key' under your distribution certificate.
  6. In the popup, go to the Access Control tab.
  7. Select ‘Allow all applications to access this item'.
  8. Save the changes.
  9. Close all windows.
  10. Run the application.
  1. 打开钥匙串访问。
  2. 在左上角,解锁钥匙串(如果已锁定)。
  3. 从左上角选择系统钥匙串。
  4. 找到您的分发证书并单击披露三角形。
  5. 双击分发证书下的“私钥”。
  6. 在弹出窗口中,转到访问控制选项卡。
  7. 选择“允许所有应用程序访问此项目”。
  8. 保存更改。
  9. 关闭所有窗口。
  10. 运行应用程序。

回答by smit shah

The problem is with the Developer Certificate on Keychain which is under "System", on the left hand panel, which is always locked and requiring my password to unlock!

问题在于左侧面板上“系统”下的钥匙串上的开发人员证书,该证书始终处于锁定状态并需要我的密码才能解锁!

So just move the Developer Certificate to "login", which is always unlocked. Now your problem gets solved.

因此,只需将开发人员证书移动到“登录”即可,该证书始终处于解锁状态。现在你的问题解决了。

回答by emotality

  1. Open Keychain Access

  2. Click on System in left pane

  3. Unlock the System keychain top left (if it is locked)

  4. Sort the System items by Kind so that the keys are at the top

  5. Look for the private key that keeps asking for password

  6. Double click on it and choose Access Control

  7. Choose "Allow all applications to access this item"

  8. Save changes, lock the System keychain and quit the Keychain app

  9. Restart the application that keeps asking to modify your keychain

  1. 打开钥匙串访问

  2. 单击左窗格中的系统

  3. 解锁左上角的系统钥匙串(如果已锁定)

  4. 按种类对系统项进行排序,以便键位于顶部

  5. 寻找不断要求输入密码的私钥

  6. 双击它并选择访问控制

  7. 选择“允许所有应用程序访问此项目”

  8. 保存更改,锁定系统钥匙串并退出钥匙串应用

  9. 重新启动不断要求修改钥匙串的应用程序

回答by Jeff Ames

I was getting this problem because I had duplicate certificates in my login and System keychains. By opening Keychain Access and deleting all certificates from System that were also in login solved this problem. Hope this helps.

我遇到这个问题是因为我的登录名和系统钥匙串中有重复的证书。通过打开钥匙串访问并从系统中删除所有也在登录中的证书解决了这个问题。希望这可以帮助。

回答by krafter

In my case I went to Keychain Access, selected "system" in "Keychains" (top left). Then for each item: right click, "Get Info", "Access Control" and added Xcode in "Always allow acces by these applications:" list.

就我而言,我去了钥匙串访问,在“钥匙串”(左上角)中选择了“系统”。然后对于每个项目:右键单击,“获取信息”,“访问控制”并在“始终允许这些应用程序访问:”列表中添加 Xcode。

回答by Desert Rose

Move your private key from System to login in keychain access.Then move your developer certificate into login.This worked for me.

将您的私钥从系统移动到钥匙串访问中登录。然后将您的开发人员证书移动到登录中。这对我有用。

回答by SuperDave

I followed a solution similar to what @krafter did but, instead of giving access to everything in the system keychain, I only needed to give add xcode to the provisioning profile under keychain -> system -> "your provision profile" -> get info -> Access Control then just added xcode. This is what worked for 4.6

我遵循了类似于@krafter 所做的解决方案,但是,我只需要将 xcode 添加到钥匙串-> 系统->“您的供应配置文件”-> 获取信息下的配置文件,而不是访问系统钥匙串中的所有内容-> 访问控制然后添加了 xcode。这适用于 4.6

回答by Stavash

Yes - run XCode with administrator privileges only. It needs administrator rights to perform a whole bunch of tasks, installations, debug sessions and such.

是 - 仅以管理员权限运行 XCode。它需要管理员权限才能执行大量任务、安装、调试会话等。

回答by Aleksejs Mjaliks

Are you sure it says "Mac OS X" not something developer tools related?

您确定它说的是“Mac OS X”而不是与开发人员工具相关的内容吗?

It is normal if Developer Tools wants to enable Developer Mode on your Mac, thus, you don't need to enter an administrator password every time you start debugging your app in the simulator for the every first time after each Xcode launch.

如果开发者工具想要在您的 Mac 上启用开发者模式是正常的,因此,您不需要在每次 Xcode 启动后每次在模拟器中开始调试应用程序时输入管理员密码。

But if you don't have enabled Developer Mode, when it was offered by Xcode, then be prepared, that Xcode will ask for an administrator password for the every first time you launch debugging in the simulator after each Xcode launch.

但是,如果您没有启用开发人员模式,那么当它由 Xcode 提供时,请做好准备,每次 Xcode 启动后,每次您在模拟器中首次启动调试时,Xcode 都会要求输入管理员密码。