Connected via ssh and executing:
xcrun altool --notarize-app --primary-bundle-id com.example.app --username exam@ple.com --password @keychain:AC_PASSWORD --file app.dmg
results in:
2019-04-17 16:06:53.146 altool[4331:55219] *** Error: User interaction is not allowed.
The password has been stored in a temporary keychain with:
security add-generic-password -a "exam@ple.com" -s "AC_PASSWORD" -p "myPassword" -A "temp.keychain"
codesigning works with the temporary keychain trick: https://apple.stackexchange.com/questions/255872.
During creation of the temporary keychain, the AC_PASSWORD
password item is added with the above command.
Executing the same command locally on the machine works.