Come for the products,
stay for the community

The Atlassian Community can help you and your team get more value out of Atlassian products and practices.

Atlassian Community about banner
4,299,673
Community Members
 
Community Events
165
Community Groups

Remote Authentication Failed

Hi y'all,

When attempting to push from my local to remote repo, I receive an error message:

remote: Invalid username or password
fatal: Authentication failed for 'https://bitbucket.org/myuser/my-repo.git/'

The usual password prompt never even shows up, just goes straight to the error message.

I have already tried resetting my password, changing the git config (so that the url has my email), and unsetting the credential helper. If anyone can help please please let me know.

 

 

3 answers

Not sure why it changed, but it seems like password login is not allowed anymore even though the email warning about it stated 1st of March 2022 (unless I misread). You will need to set up SSH instead, follow this tutorial:

Set Up SSH 

And then change your repository's origin URL (or whatever remote you have, origin is just the default) using the following:

`git remote -v`

    - to see the old one, it will likely be in this format:

            - https://<username>@bitbucket.org/<organisation>/<project-name>.git

and needs to be changed using this command:

`git remote set-url origin <new-url>`

    - with the following URL format:

            - ssh://git@bitbucket.org/<organisation>/<project-name>.git

 

Note the ending part of the URL, you can copy it from the original format to the new one, the username is no longer going to be there and instead of https://, it's ssh://

Well, I had the exact same issue with VS code, it works ok when I run everything in a terminal. I hope this can help you narrow down the issue. VS Code may have something different to the system terminal

0 votes
Caroline R Atlassian Team Nov 15, 2021

Hi, @Maxwell Cohen! Welcome to the community! 

Since you are using HTTPS, I suggest you try using an App Password to authenticate with git. These are substitute passwords for a user account, designed to be used for a single purpose with limited permissions. App passwords can be used to run Git commands over HTTPS to a user's Bitbucket account and to integrate Bitbucket with other tools like Sourcetree and Bamboo. 

You can follow the next steps to create an App password:

  1. From your avatar in the bottom left, click Personal Settings;

  2. Click App passwords under Access management;

  3. Click Create app password;

  4. Give the app password a name related to the application that will use the password;

  5. Select the specific access and permissions you want this application password to have;

  6. Copy the generated password and either record or paste it into the application you want to give access to. 

  7. The password is only displayed this one time.

After you create this App Password, you can use it to authenticate to Bitbucket in replacement of your account password. You can change the URL of your local repo by following the next command: 

git remote set-url origin https://<Bitbucket_Username>:<App Password>@bitbucket.org/<workspace>/<repository>.git

If you would like to read more about App Passwords you can access this documentation: App passwords

Please let us know how it goes and in case you need any help with this process, we'll be glad to assist you!

Kind regards,
Caroline

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
TAGS
Community showcase
Published in Bitbucket

Git push size limits are coming to Bitbucket Cloud starting April 4th, 2022

Beginning on April 4th, we will be implementing push limits. This means that your push cannot be completed if it is over 3.5 GB. If you do attempt to complete a push that is over 3.5 GB, it will fail...

2,245 views 2 9
Read article

Community Events

Connect with like-minded Atlassian users at free events near you!

Find an event

Connect with like-minded Atlassian users at free events near you!

Unfortunately there are no Community Events near you at the moment.

Host an event

You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events

Events near you