I can't start a local Xcode Server from the Xcode Preferences window.
I've tried both a user account created for the purpose and my admin account. The progress text reaches "Confiuring SSL Certificates…", suspends for a few seconds, then displays an alert with the same sort of content others report, apparently a printout of the NSError
with human-readable id:
Could not export API server SSL certificate: Error Domain=XCSSecurity Code=-1 "OpenSSL: Error decrypting key,
followed by a stack dump of the source files and lines where the error was thrown. (Colorizing the plain text was not my idea.)
As suggested on StackOverflow, I tried sudo xcscontrol --reset
from the command line. It exited without error. No change.
Another reply to that SO question suggested deleting /Library/Developer/XcodeServer/
. After quitting Xcode, I did, then restarted Xcode. Same problem.
I tried xcscontrol --initialize --build-service-user xcodeuser
. This resulted in a dialog box asking for the password to a keychain named "xcsd". A user on that stackoverflow exchange reported finding that keychain in Keychain Access, it's not in mine. The System.keychain
contains an "Identity Preference" named com.apple.dt.XCSBuilder
, which expired in mid-2021. I'm not certain enough to try deleting it. Dead end.
xcsd
turns out to be a launch daemon embedded in Xcode.app
. It embeds a load of JavaScript, much of it Node.js.
It also embeds a bash script named create_keychains
. It does create an xcsd
keychain. It's just a few lines, but I'm not eager to fool with it — especially not knowing what's in $XCSSECURITY_PATH
.
TEST_PATH=/tmp/XCSTest
mkdir -p $TEST_PATH
echo "repositories" > $TEST_PATH/RepositoryKeychainSharedSecret
"$XCSSECURITY_PATH" keychain-create -k "$TEST_PATH/Repositories.keychain" -m "$TEST_PATH/RepositoryKeychainSharedSecret"
echo "xcsd" > $TEST_PATH/XCSDKeychainSharedSecret
"$XCSSECURITY_PATH" keychain-create -k "$TEST_PATH/xcsd.keychain" -m "$TEST_PATH/XCSDKeychainSharedSecret"
- Xcode 13.2.1 (13C100)
- macOS 12.1 (21C52) Monterey
- MacBook Pro M1 (late 2020)
- 1 TB storage free
- memory pressure 50–60%, which seems typical
- CPU near-idle with short runs near-saturated
- xcode-select is pointed to /Applications/Xcode.app, which is the only instance of Xcode on the machine.
(Gosh, maybe I ought to report this to Feedback.)