Authentication Error - "remote: Invalid username or password"

Still need help?

The Atlassian Community is here for you.

Ask the community

For Atlassian eyes only

This article is Work In Progress and cannot be shared with customers.

Platform Notice: Cloud Only - This article only applies to Atlassian products on the cloud platform.


Receive error "Invalid Username or password" when authenticating to Bitbucket Cloud via git over HTTP.  The full error messages 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:
fatal: Authentication failed for ''


remote: Invalid credentials
fatal: Authentication failed for ''

This article covers local side issues only.  Please check Atlassian Bitbucket Status for other issues.  If using SSH, please see remote: No supported authentication methods left to try!


Here are some possible causes for this issue:

  • If using an App Password make sure to use your username, not the App Password label or your email address. Your Bitbucket username is listed under Bitbucket profile settings on your Bitbucket Personal settings page.
  • The credentials in your git client are not correct or the credential manager is not providing the correct credentials for authentication. 


These steps will clear any stored credentials in your machine and reset your Atlassian Account password.  Steps:

  1. First, reset your app password.
  2. Make sure the username is correct, not the app password label.
  3. Clear stored git 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.
    3. Linux: See the resolution in: Why am I not prompted for password when pushing or pulling to my repositories in Bitbucket Cloud via HTTPS?
  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 toolbar 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 the Accounts tab, remove stored credentials. 
  4. Try authenticating via Sourcetree once again. 

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

Last modified on Feb 2, 2023

Was this helpful?

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