Authentication Error - "remote: Invalid username or password"

Still need help?

The Atlassian Community is here for you.

Ask the community


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

Sample Error Message

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:
fatal: Authentication failed for ''


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. 


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. 


  1. Firstly reset your password at ""
  2. Ensure you are able to login to Bitbucket Cloud -  ""
  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

Last modified on Jul 24, 2018

Was this helpful?

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