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

Any workarounds when 2fa is enabled #290

Open gchan662 opened 1 year ago

gchan662 commented 1 year ago

Maybe this is a known situation and I'm just oblivious to it. However, is there a method in which xcodes can be used when 2fa is enabled? I'm unable to find a way to install Xcode automatically when 2fa is enabled. Any help is greatly appreciated.

triplef commented 1 year ago

I also have not found a way to use xcodes on CI with 2FA-enabled accounts. It would be great to see this scenario added to the readme to at least know what works and what doesn’t. 🙏

See also #141 and #248.

NikolaDucak commented 1 year ago

I've found something that worked for me, agreeing to developer terms and guidelines from https://developer.apple.com after logging in and doing xcodes update ... and trying xcodes install ...again worked, i've left a similar comment here: https://github.com/XcodesOrg/xcodes/issues/291#issuecomment-1585036481

gemmakbarlow commented 1 year ago

I'd recommend reading https://github.com/XcodesOrg/xcodes/pull/257 which provides the ability to use FASTLANE_SESSION for auth. This may help in some of the cases mentioned above.

adamsousa commented 8 months ago

Biggest issue I'm finding is even when using FASTLANE_SESSION for auth, CI pipeline still requires superuser permission to finish the xcode installation. Would like to automate xcode upgrades to our jenkins pipeline.

gitperr commented 8 months ago

@adamsousa What happens when you skip the superuser part with --no-superuser? That seems to skip some optional steps, wondering if superuser is then crucial for the installation.

Also, in automation you could remove password requirement for xcodes in sudoers or so. Or better yet, become the superuser before you run the xcodes

mkatychev commented 5 months ago

Doing a browser based sign-in to https://developer.apple.com/account helped put up the OTP prompt on a subsequent xcodes install