Authentication Error - "remote: Invalid username or password"

Still need help?

The Atlassian Community is here for you.

Ask the community

This Knowledge Base article is written specifically for the Atlassian Cloud platform. Due to Functional differences in Atlassian Cloud, it is not applicable to Atlassian Server products.

Problem

Receive error "Invalid Username or password" when authenticating to Bitbucket Cloud via git. The full error message as below. 

remote: Invalid username or password. Invalid username or password. If your organization manages your account or you’ve enabled two-step verification, create an app password to log in: https://confluence.atlassian.com/x/9DJmMQ
fatal: Authentication failed for 'https://xxxxxx@bitbucket.org/xxxxxxx/xxxxxxx.git/'

Cause

One of the possible causes for this issue is that there are stored credentials in your git client or credential manager which interferes while authenticating with Bitbucket Cloud. It could also mean that the credential manager is not providing the correct credentials for authentication. 


Solution

To solve this, you will have to clear any stored credentials in your machine and reset your Atlassian Account password. Please refer to the steps below. 

 Steps

  1. Firstly reset your password at "https://id.atlassian.com"
  2. Ensure you are able to login to Bitbucket Cloud -  "https://bitbucket.org"
  3. Clear stored credentials on your machine
    1. Windows: Navigate to Credential Manager and clear stored credentials related to Bitbucket Cloud.
    2. Mac OS X: Navigate to Keychain Access and clear stored credentials related to Bitbucket Cloud
  4. Once this is done, try to login to perform a git operation authenticating to Bitbucket Cloud once again. 

Additional Steps if you are using Sourcetree and experiencing this issue. 

  1. Open Source Tree
  2. On Windows
    1.  On the tool bar click "Tools" >> click "Options"
    2. On the "Options" window click "Authentication" tab
    3. Identify stored credentials to Bitbucket Cloud and remove them. 
  3. On Mac
    1. Click Sourcetree > Preferences >> Accounts 
      1. Shortcut = Command + Comma
    2. On Accounts tab, remove stored credentials. 
  4. Try authenticating via Sourcetree once again. 


If the issue still persist, please reach out to Atlassian Community or Bitbucket Cloud Support for further assistance


Description Receive error "Invalid Username or password" when authenticating to Bitbucket Cloud via git. One of the possible causes for this issue is that there are stored credentials in your git client or credential manager which interferes while authenticating with Bitbucket Cloud. It could also mean that the credential manager is not providing the correct credentials for authentication. 
Product Bitbucket
Platform Cloud
Last modified on Oct 8, 2018

Was this helpful?

Yes
No
Provide feedback about this article
Powered by Confluence and Scroll Viewport.