XcodesOrg / xcodes

The best command-line tool to install and switch between multiple versions of Xcode.
MIT License
3.59k stars 119 forks source link

unclear which password must be entered to finish installation when using smart card #283

Open kambala-decapitator opened 1 year ago

kambala-decapitator commented 1 year ago

I use smart card and sometimes macOS asks for its password for authentication instead of admin password / Touch ID. When password is asked by GUI dialog it's clear which one must be entered, but here it turned out that I was expected to enter the smart card password instead of the user password.

$ xcodes install --latest --experimental-unxip
Updating...
Latest release version available is 14.2
Apple ID: <redacted>
Apple ID Password: 
Two-factor authentication is enabled for this account.

Enter "sms" without quotes to exit this prompt and choose a phone number to send an SMS security code to.
Enter the 6 digit code from one of your trusted devices: <redacted>

Downloading with aria2 (/opt/homebrew/bin/aria2c)
(1/6) Downloading Xcode 14.2.0+14C18: 99 %
(2/6) Unarchiving Xcode (This can take a while)
Using experimental unxip. If you encounter any issues, remove the flag and try again
(3/6) Moving Xcode to /Applications/Xcode-14.2.0.app
(4/6) Moving Xcode archive Xcode-14.2.0+14C18.xip to the Trash
(5/6) Checking security assessment and code signing
(6/6) Finishing installation
xcodes requires superuser privileges in order to finish installation.
macOS User Password: 
Failed executing: `/usr/bin/sudo -S /usr/sbin/DevToolsSecurity -enable` (1)

Enter PIN for 'Andrey Filipenkov': Enter PIN for 'Andrey Filipenkov': 
sudo: no password was provided
sudo: a password is required

Last 4 lines are displayed in red. The Enter PIN for 'Andrey Filipenkov': looks like request for the smart card password (in GUI dialog it's displayed like that).