Hi, my name is David Carr and I'm a PHP Developer.


Blog Archives Categories Authors About Me Open Source Books Contact Me

Sponsor Me

Help support the blog so that I can continue creating new content!

My Latest Book

Laravel: The Modular way

Learn how to build modular applications with Laravel Find out more

BitBucket

David Carr

Fatal: Authentication failed (on git push)

Problem

Lost authentication from BitBucket resulting in invalid credentials. Pushing to BitBucket and received this response:

remote: Invalid credentials
fatal: Authentication failed for **repo**

Solution

  1. Go to https://bitbucket.org/account/settings/app-passwords/ and create a new app password

  2. Tick all the permissions required, copy the password

In terminal:

On an already-cloned project:

git remote set-url origin https://bitbucket-username:app-password@bitbucket.org/repo-name.git

To clone a new project:

git clone https://bitbucket-username:app-password@bitbucket.org/repo-name.git

Why is it happening?

Beginning March 1, 2022, you will no longer be able to use your Atlassian account password when using Basic authentication with the Bitbucket Cloud REST API or Git over HTTPS.

Solution has been provided from StackOverflow - https://stackoverflow.com/questions/71378839/how-can-i-solve-this-invalid-credentials-problem-on-bitbucket

Copyright © 2009 - 2022 David Carr. All code MIT license. All rights reserved.