[Fix] fatal Invalid credentials

The Error “fatal: Invalid credentials”, is an error that is invoked whenever you are using and are trying to push a project or file to bitbucket. Given below is the snippet of the error you might get:

git push -u origin master

fatal: Invalid credentials

I would like to share with you the steps I took to fix the “fatal: Invalid credentials” in your project file.

Why “fatal Invalid credentials” error is seen?

The error, “fatal: Invalid credentials” is seen because you are using your usual bitbucket account password rather to use your app password which you will have to set from bitbucket’s official website itself.

The detailed solution to fix the error “fatal: Invalid credentials”, is given below:

How to fix the error fatal Invalid credentials ?

To fix the error fatal: Invalid credentials, you have to set your own application password which you can set from the bitbucket’s official website.

If you still face the error you will have to clone the project again for mac users. For Windows users, you have to remove all the previous token credentials using CREDENTIAL MANAGER.

Follow the steps mentioned below to fix the error, “fatal: Invalid credentials”:

Step 1: When you are prompted to log in, you will have to use the application passsword:

Step 2: To get the application password, Go to the bitbucket.org website and log in

Step 3: You will see your avatar in the bottom left side of the webpage, and then click on Personal Settings.

Step 4 The next step is that you have to Click on App passwords under Access management.

Step 5: Press on the Create app password option.

Step 6: You have to give the app password sufficient rights, and a label related to the application that will use the password for your projects

Step 7: Please make a note to save the above generated password.

For mac users, in case you still have the same error after above mentioned steps, you will have to try cloning project again.

For Windows users, in case you still have the same error after above mentioned steps, you have to remove your previous bitbucket token credentials which you might have stored in your machine using CREDENTIAL MANAGER.

This should fix the error, “fatal: Invalid credentials”.

Conclusion

To fix the error “fatal: Invalid credentials”, you have to set your own application password which you could set from the bitbucket’s official website.

If you still face the error you will have to clone the project again for mac users and for Windows users you have to remove all the previous token credentials using CREDENTIAL MANAGER.