Notarization fails, Apple ID has been locked

macOS 10.14.4, Xcode 10.2.1


I am trying to notarize my macOS app for the first time, using altool on the command line.


But this is what I get:


andy$ xcrun altool --notarize-app --primary-bundle-id "com.example.transcribe.zip" --username "andy" --password "@keychain:ALTOOL_PASSWORD" --file Transcribe\!.zip

2019-05-01 11:27:11.204 altool[6836:211392] *** Error: Unable to validate your application. This Apple ID has been locked for security reasons. Visit iForgot to reset your account (https://iforgot.apple.com).


I have reset my password as it suggests - twice in fact - but in makes no difference.


I spoke to someone who suggested I try downloading an app from the app store to see if it works - it does, no problem.


Help!

Accepted Reply

Answering my own question here, because I did finally find the answer. Here is the page where I found it:


https://stackoverflow.com/questions/32976976/how-should-the-keychain-option-be-used-for-altool


But in case that link ever breaks, the key point is that you should use the Application Loader app to sign in using your Apple ID and the application specific password you created. Check the "Stay signed in" box. This application is buried away inside Xcode, you can launch it from the terminal like this:


open "/Applications/Xcode.app/Contents/Applications/Application Loader.app"


Then you can run altool like this, and it works:


xcrun altool --notarize-app --primary-bundle-id "com.mysite.myapp" -u "my@apple.id" -p @keychain:"Application Loader: my@apple.id" --file myapp.zip


Then wait for email telling us whether notarization succeeded.

Replies

Answering my own question here, because I did finally find the answer. Here is the page where I found it:


https://stackoverflow.com/questions/32976976/how-should-the-keychain-option-be-used-for-altool


But in case that link ever breaks, the key point is that you should use the Application Loader app to sign in using your Apple ID and the application specific password you created. Check the "Stay signed in" box. This application is buried away inside Xcode, you can launch it from the terminal like this:


open "/Applications/Xcode.app/Contents/Applications/Application Loader.app"


Then you can run altool like this, and it works:


xcrun altool --notarize-app --primary-bundle-id "com.mysite.myapp" -u "my@apple.id" -p @keychain:"Application Loader: my@apple.id" --file myapp.zip


Then wait for email telling us whether notarization succeeded.