30

How to fix "no identity found - Command CodeSign failed with a nonzero exit...

 3 years ago
source link: https://sarunw.com/posts/how-to-fix-command-codesign-failed/
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.

How to fix "no identity found - Command CodeSign failed with a nonzero exit code" error in Xcode

20 Feb 2021 ⋅ 1 min read ⋅ Xcode

Table of Contents

Today I got the "Command CodeSign failed with a nonzero exit code" error with the following information.

Signing Identity: "My identity"
/usr/bin/codesign --force --sign xxxxxxxx --timestamp=none /path/to/derived/data...
xxxxxxxx: no identity found
Command CodeSign failed with a nonzero exit code

There might be several reasons that cause this error. I will share one that just happened to me.

Cause of the problem

I got this problem when I mess up with keychains in the Keychain Access app. I created a new certificate and tried to delete an old one. And I think Xcode was attempting to use the deleted one.

revenucat.png

Solution

My solution is what we always do when we got an Xcode problem, Clean Build Folder.

  1. Click menu Product > Clean Build Folder while holding down option key or ⌘ - CMD + ⇧ - SHIFT + ⌥ - option + K.
  2. Close the Xcode. This is a very important step for me. I need to close it to work.
  3. Reopen the app, and you might see the dialog asking to access the keychain. Grant the access, and the problem should go away.

You may also like

How to fix "Skipping duplicate build file" warning in Xcode

There might be several reasons that cause this error. Here are the solutions that fix it for me.

Xcode
// MARK: - What is it?

If this is just a comment for you, this article might benefit you.

Xcode
Record iOS Simulator video as mp4 and GIF with Xcode

Xcode 12.5 brings many great updates and features. One of them is the ability to record a video of the app directly from the Simulator app.

Xcode

Read more article about Xcode

or see all available topic

Get new posts weekly

If you enjoy this article, you can subscribe to the weekly newsletter.

Every Friday, you’ll get a quick recap of all articles and tips posted on this site — entirely for free.

Feel free to follow me on Twitter and ask your questions related to this post. Thanks for reading and see you next time.

If you enjoy my writing, please check out my Patreon https://www.patreon.com/sarunw and become my supporter. Sharing the article is also greatly appreciated.

Become a patron

Tweet

Share

Next
Using App Store Connect API with Fastlane Match

Apple announced the App Store Connect API back in WWDC18. It provides an official way to interact with App Store Connect, and Fastlane already supports this. With a recent 2FA enforcement from Apple, it is time for you to adopt it.

← Home


About Joyk


Aggregate valuable and interesting links.
Joyk means Joy of geeK