How to fix the issue «Authentication required (repo.magento.com)» while executing Composer commands?

To fix the issue you need to:

  1. Setup credentials for the repo.magento.com