Warn when running codesign.py when the keychain is locked |
|||||
Issue descriptionThis problem has bit me a few times over the years. I ssh to a remote machine and run a device build. This will fail one does not run security keychain unlock first. And it will fail with an unhelpful -1 error. What do you think of checking the keychain lock status first, and emiting a warning if running codesign while locked?
,
Aug 7 2017
Sure, I'll give it a look soon.
,
Aug 8 2017
This is already checked as part of "gn gen" by the find_signing_identity.py. If the keychain is locked, then no identity will be found, and "gn gen" will fail with the following error: Tried to prepare a device build without specifying a code signing identity and could not detect one automatically either. TIP: Simulator builds don't require code signing... I can move the detection from the "gn gen" step to the build step (by moving the code into codesign.py) but then it will mean that developer that don't have a code signing identity installed will only see the error at the end of the build instead of at the beginning (though they will probably fail also at that step as they do not have mobile provisioning profiles).
,
Aug 8 2017
=> back to justincohen for feedback on proposed change.
,
Aug 11 2017
python ./build/config/ios/find_signing_identity.py --identity-description 'iPhone Developer' seems to work regardless of the keychain being locked.
,
Aug 16 2017
Ah, then I don't know how to detect whether the keychain is locked or not. I was expecting the command to not have access to Keychain and return an error if it was locked. I looked at "xcrun security help" but don't see any command to check whether the keychain is locked or not (there is an unlock command but it is interactive and thus I cannot run it as part of the build and I'm afraid it will ask for password even if the keychain is already unlocked).
,
Aug 16 2017
,
Aug 20
This issue has been Available for over a year. If it's no longer important or seems unlikely to be fixed, please consider closing it out. If it is important, please re-triage the issue. Sorry for the inconvenience if the bug really should have been left as Available. For more details visit https://www.chromium.org/issue-tracking/autotriage - Your friendly Sheriffbot
,
Aug 20
|
|||||
►
Sign in to add a comment |
|||||
Comment 1 by sczs@chromium.org
, Jul 26 2017Labels: -Type-Bug Type-Task
Owner: sdefresne@chromium.org
Status: Assigned (was: Untriaged)