VS 2022 Bitbucket credential failed
Asked Answered
J

2

6

I have a repo on Bitbucket I just installed VS2022 I clone my repo and get Invalid credentials BUT the operations work

I check the repo and see the commits

this is what I see in the output window

Pushing master
Error encountered while pushing to the remote repository: Git failed with a fatal error.
Git failed with a fatal error.
Invalid credentials
Invalid credentials
Enumerating objects: 7, done.
Delta compression using up to 8 threads
Compressing objects:  25% (1/4)
Compressing objects:  50% (2/4)
Compressing objects:  75% (3/4)
Compressing objects: 100% (4/4)
Compressing objects: 100% (4/4), done.

I downloaded the latest Git-Credential-Manager (1.20) and the VS installer has Git for windows selected.

Any clues?

Jabalpur answered 30/11, 2021 at 0:27 Comment(0)
W
5

I know this may not be directly related to your question, but it is relevant from March 1st 2022 and afterwards. Bitbucket no longer supports Atlassian accounts credentials over HTTPS. Here is the official announcement.

What this means is that if you want to continue using git over HTTPS (in Visual Studio or any IDE for that matter), then you need to use their App passwords utility.

You can setup your app password from your personal settings page in Bitbucket. After setting all of the permission and label (which you can name anything), you will be given a password. That password you need to add to your Bitbucket credentials.

enter image description here

If you are on Windows, that can be done via the Credential Manager window

enter image description here

Then you should be all set!

Waterborne answered 17/3, 2022 at 9:41 Comment(0)
F
2

Step 1 : Search for Windows Credential Manager (Control Panel) using Search icon in Windows 10/11

Step 2 : Windows Credential Screenshot

Step 3 : Select Windows Credentials and the list of all credentials are displayed

Step 4 : Select the credential for Git or Bitbucket and either edit them or completely remove them

Step 5 : If you remove the credentials completely, while you are trying to clone repository using Visual Studio, it again prompts for authorization and then you can enter correct credentials and it will work

I have tried this and it worked for me

Fredia answered 22/2, 2022 at 6:2 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.