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

Asking for user password on mac2.metal ec2 #282

Open rwong2888 opened 1 year ago

rwong2888 commented 1 year ago

I am running xcodes install --latest --experimental-unxip --empty-trash as ec2-user on a mac2.metal ec2 instance.

There is no password for the user, but it is able to sudo. However, it is prompting for the password anyway. Can xcodes detect and not prompt for password?

As a workaround, I am running sudo su and becoming root and then xcodes install --latest --experimental-unxip --empty-trash. Hopefully that works.

If not, I will try the --no-superuser flag. Not sure what becoming root actually sets up.

Don't ask for superuser (root) permission. Some optional steps of the installation will be skipped.

epau commented 1 year ago

ec2-user won't have a password but you can run commands with sudo.

On mac ec2 instances, i run all xcodes commands with sudo and haven't had an issue sudo xcodes install --latest --experimental-unxip

sdarwin commented 7 months ago
  1. Which steps does --no-superuser skip? Are they important?

  2. Even with a user account that has full passwordless sudo privileges, and is in the admin group, it asks for a password. What does it require a password for then?

  3. Is running xcodes with sudo a valid option? Perhaps even the recommended one. If the script always attempts to do something as the root account.

Could these be added in the docs? If too detailed for the README file (perhaps it is) create a new docs/faqs.md or additional_notes.md file.