I have the following error:
Command /usr/bin/codesign failed with exit code 1
Here is what I already did for trying to fix this:
I went to Key Access, selected the private key, and added XCode to the list of apps that can access it. That worked for me