13

I am following the instructions to codesign gdb on my MBP however when I get to the end of the System certificate creation process, keychain says "Unknown Error = -2,147,414,007" and the certificate has not been created.

It creates a certificate fine for login location, but system fails.

What is the problem and how can I fix this?

2 Answers 2

7

I got the same error, so I went through the process but created the certificate in the login keychain. Once this is done you can drag the certificate into the System keychain through the UI.

You will need to unlock your System keychain first if it is showing as a locked padlock: just right-click and select 'Unlock keychain "System"'.

You have to enter your password several times but eventually it works, and the corresponding codesign command works:

codesign -fs your-cert-name $(which gdb)
8
  • 3
    I've tried this, and I'm still getting the same thing unfortunately. Unable to find Mach task port for process-id 39655: (os/kern) failure (0x5). (please check gdb is codesigned - see taskgated(8)) Oct 30, 2017 at 23:14
  • Did you unlock your System keychain first? I noticed my local one had the unlocked padlock symbol but the System one was locked. I unlocked it before trying to drag-and-drop the certificate. Also, check there aren’t more than one gdb binary, because you may be signing the wrong one: locate gdb Nov 1, 2017 at 8:52
  • Yeay! A different error this time During startup program terminated with signal ?, Unknown signal. When did gdb break on macOS? Nov 1, 2017 at 12:51
  • Ok so it looks like you’re all set with code signing. No idea about the gdb error :) Nov 2, 2017 at 13:22
  • I'll mark as the accepted answer, this is probably an issue with gdb on my machine. I think for now I'll just debug on my linux VM! Thanks. Nov 2, 2017 at 13:33
0

Some of the tutorials I've been walking through outlining this process (& for me, uploading to TestFlight ex: Ray Wenderlich) specify to leave the CA email blank. The hint text states it's required, but I was ignoring this as the tutorials stated. By just adding the email address of the certificate authority (my admin account registered to itunes connect), I was able to download the certificate.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .