xcode 代码签名错误:与默认钥匙串中的密钥对不匹配

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

Code signing error: Doesn't match key pair in default keychain

iphonexcodecodesign

提问by abhiTouchmagic

*****Code Sign error: The identity 'iPhone Developer: XXXXXXXXXX' doesn't match any valid certificate/private key pair in the default keychain**.***

*****代码签名错误:身份“iPhone Developer: XXXXXXXXXX”与默认钥匙串中的任何有效证书/私钥对不匹配**.***

I am a member in developer profile, I have the provisioning profile installed, what must be the problem here?

我是开发人员配置文件中的成员,我安装了配置文件,这里一定是什么问题?

Code Sign error: The identity 'iPhone Developer: XXXXXXXXXXXX' doesn't match any valid certificate/private key pair in the default keychain

代码签名错误:身份“iPhone 开发人员:XXXXXXXXXXXX”与默认钥匙串中的任何有效证书/私钥对都不匹配

What am I supposed to do? I already searched for a solution but still didn't find any.

我应该做些什么?我已经搜索了解决方案,但仍然没有找到任何解决方案。

采纳答案by Tom

This error suggests that there is a problem with either your certificate or your private key.

此错误表明您的证书或私钥存在问题。

If you open Keychain Access (in Applications/Utilities), do you see 'iPhone Developer: XXXXXXXXXX' in your certificates? If not, you need to download it from the Program Portal.

如果您打开钥匙串访问(在应用程序/实用程序中),您是否在证书中看到“iPhone 开发人员:XXXXXXXXXX”?如果没有,您需要从程序门户下载它。

When you created the certificate 'iPhone Developer: XXXXXXXXXX', did you generate a certificate signing request on the same computerthat you are now using to compile? If not, the private key that goes with your certificate may not be installed on the computer; whoever generated the signing request will need to send it to you, and you will need to add it to your keychain.

当您创建证书“iPhone Developer: XXXXXXXXXX”时,您是否在现在用于编译的同一台计算机上生成了证书签名请求?如果没有,则可能是您的证书所附带的私钥没有安装在计算机上;生成签名请求的人需要将其发送给您,您需要将其添加到您的钥匙串中。

回答by appsthatmatter

  • Just open a bash.
  • Go into the ProjectName*.xcodeproj* directory
  • And remove every *.mode1v3 and *.pbxuser file
  • 只需打开一个bash。
  • 进入 ProjectName* .xcodeproj* 目录
  • 删除每个 *.mode1v3 和 *.pbxuser 文件

Then start xcode again and you're lucky.

然后再次启动 xcode,你很幸运。

For my case it was like:

就我而言,它就像:

  • cd iCodeBrowser/iCodeBrowser.xcodeproj/
  • rm brandontrieb.*
  • cd iCodeBrowser/iCodeBrowser.xcodeproj/
  • rm Brandontrieb.*