简体   繁体   中英

VS code unable to use SSH to push and pull from Bitbucket

Currently, I'm using source tree to push & pull from Bitbucket with SSH.

However, when I try to use VS Code to do the same thing, it ask for a password.

And I get the following error after entering my Bitbucket password:

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

I searched for a few articles, but nothing I tried seemed to be working.

I'm on an M1 Macbook - OS Big sur. This is for my professional Bitbucket account.

This was one of the docs I follow: https://support.atlassian.com/bitbucket-cloud/docs/set-up-an-ssh-key/

Try and switch to command line, and go to the root folder of your local repository.

Check your remote URL with git remote -v : if it starts with https:// , it won't use SSH. At all.

Switch to ssh: git remote set-url origin git@bitbucket.org:<me>/<MyRepo> ( <me> and <myRepo> are placeholder values for you to replace: don't use < and > )
Test also your SSH key was correctly registered to your BitBucket account : ssh -Tv git@bitbucket.org .

Then switch back to VSCode, and see if your issue persists.


This is followed by microsoft/vscode issue 170436 .

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM