For me it's because I don't have distribution certificates. Go to Account by (Command + ,) -> Accounts, select the account and click Manage Certificates... For me it only had development certificate, so just click "+" and add an app distribution certificate. Once it' done, when uploading app it should pop up an dialog box asking password for accessing the new certificate.
Topic:
App Store Distribution & Marketing
SubTopic:
App Store Connect
Tags: