Which password I should use for altool command line?
Asked Answered
D

3

5

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

xcrun altool --list-apps -u [email protected] -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
Dah answered 10/5, 2021 at 11:40 Comment(0)
D
7
  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 [email protected] -p "APP-SPECIFIC-PASSWORD"

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

Dah answered 10/5, 2021 at 12:20 Comment(0)
S
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".

Sweatband answered 21/9, 2021 at 22:2 Comment(0)
M
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.

Madra answered 19/10, 2021 at 8:22 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.