Fastlane : [altool] Error: Unable to upload archive. Failed to get authorization for username and password

Hello I was struggling with this issue for many days.

Solution

Step 1

Go to https://appleid.apple.com/account/manage login in and go to App-Specific Passwords, after generate a new App Specific Password copy it.

Step2

Inside fastlane folder create a new file .env.default and add the two properties .

FASTLANE_USER=<Apple USER ID>
FASTLANE_APPLE_APPLICATION_SPECIFIC_PASSWORD=<App-Specific Password>

Use an app-specific password to sign in to an app or service not provided by Apple such as fastlane.

——————————Other options——————————–

You have different options not only using .env file.

1- In your Fastfile

FASTLANE_USER=<Apple USER ID>
FASTLANE_APPLE_APPLICATION_SPECIFIC_PASSWORD=<App-Specific Password>

lane :beta do
  crashlytics
end

2- Bash Profile

nano ~/.bash_profile

insert your properties

FASTLANE_USER=<Apple USER ID>
FASTLANE_APPLE_APPLICATION_SPECIFIC_PASSWORD=<App-SpecificPassword>

CTRL + X – save changes.
reopen your terminal

Please in check the link for more details about.
https://docs.fastlane.tools/best-practices/keys/

Leave a Comment

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)