Create Bitbucket App Password Fix Auth Errors Git |Video upload date:  · Duration: PT3M50S  · Language: EN

Step by step guide to create a Bitbucket app password and resolve fatal invalid credentials and authentication failed errors when using Git

Got a fatal invalid credentials or authentication failed error when you tried to push to Bitbucket This guide explains how to make a Bitbucket app password and shoehorn it into Git so your pushes stop acting like a dramatic breakup

Why this actually works

Bitbucket app passwords are short lived only in their display time and tiny compared to the emotional lifespan of a bad commit message They let you authenticate Git operations without handing over your main account password which is a very good thing if you like sleep and not getting locked out

Step by step setup

  1. Create the app password in Bitbucket

    Sign in to the Bitbucket web console then open Personal settings and choose App passwords Click Create app password Give it a sensible label like git push helper Grant repository read and write if you plan to push Note the site will show the secret only once so copy it and hide it somewhere safer than a sticky note on your monitor

  2. Update the Git remote to force credential prompt

    If your remote uses an anonymous url Git may not know who you are Set a remote that includes your Bitbucket username so Git asks for credentials

    git remote set-url origin https://bitbucket.org/username/repo.git

    Replace username and repo with your actual values This forces Git to prompt for a username and password on next network operation

  3. Clear the old cached credentials

    Old credentials are clingy and will be tried until they die Remove any saved Bitbucket entries from your OS credential store For Windows open Credential Manager and delete the entry For macOS open Keychain Access and delete the saved credential On Linux remove entries managed by your credential helper or run a helper specific command

    If you like terminal incantations you can also run an interactive reject which tells Git to forget a url

    printf 'url=https://bitbucket.org\n' | git credential reject
  4. Use the app password when prompted

    When Git asks for a password paste the app password you generated earlier The username is still your Bitbucket username If you use a GUI credential helper it will usually offer to save the new app password so you do not have to paste it every time

  5. Test with a push or pull

    Run a simple command like

    git push origin main

    If the fatal invalid credentials or authentication failed message goes away congratulations You have taught Git a new trick

Troubleshooting tips

  • Double check the remote url spelling and that it includes the right username typos are the quiet saboteurs
  • Make sure the app password has repository read and write if you need to push
  • If you use two factor authentication your normal account password will not work which is exactly why you want an app password
  • If errors persist try removing and readding the remote or temporarily disable the credential helper to see raw prompts

This was a short and mildly judgmental guide to creating a Bitbucket app password updating your Git remote clearing cached credentials and testing your connection Now go push something useful and spare us another authentication failed error report

I know how you can get Azure Certified, Google Cloud Certified and AWS Certified. It's a cool certification exam simulator site called certificationexams.pro. Check it out, and tell them Cameron sent ya!

This is a dedicated watch page for a single video.