4

Trying to execute altool command, but it fails, that password is incorrect:

xcrun altool --list-apps -u user@domain.com -p PASSWORD
  • I did try to use my user name password.
  • I did try to use @keychain functionality failing, that it is failing because keychain item not found. I did fallow this instructions. It is failing with this message: Error: Failed to read legacy keychain item
Eric Aya
  • 69,473
  • 35
  • 181
  • 253
Ramis
  • 13,985
  • 7
  • 81
  • 100

3 Answers3

5
  1. Login to https://appleid.apple.com/
  2. Generate APP-SPECIFIC PASSWORD enter image description here
  3. Save generated password as later it will not be able to view and edit
  4. Use generated password in the altool.
Example:
xcrun altool --validate-app -f best/my/app.ipa -u username@mail.com -p "APP-SPECIFIC-PASSWORD"

Notes: After changing users password all app specific passwords will be revoked.

Ramis
  • 13,985
  • 7
  • 81
  • 100
5

The failed to read legacy keychain item is simply because you put the password in your keychain a long time ago and OS X has had several updates in the mean time. Simply run the store command again:

xcrun altool --store-password-in-keychain-item "AL_TOOL" -u "" -p ""

You can remove the old item if it is still there. Now your script can read the password with -p "@keychain:AL_TOOL".

Dennis
  • 555
  • 8
  • 17
1

I only get this error if I place the password in an iCloud keychain. If I open Keychain Access and add a password item with specifically selecting "login" keychain, altool is able to read from it without an error.

Maxim V. Pavlov
  • 10,303
  • 17
  • 74
  • 174