cause: wrong credentials
The main problem is that people here try to use the username and password used for login in Magento website.
1. Go to https://marketplace.magento.com/ sign in with your own credentials.
2. After that go to my profile from the top right corner.
3. Then click on access keys.
4. You might have keys already generated if not please click on the Create new access keys(make sure you are creating or using keys for right Magento version 1 or 2).
and use public key as username and private key as a password.