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.
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:
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
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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:
From your avatar in the bottom left, click Personal Settings;
Click App passwords under Access management;
Click Create app password;
Give the app password a name related to the application that will use the password;
Select the specific access and permissions you want this application password to have;
Copy the generated password and either record or paste it into the application you want to give access to.
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
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.