Home > OS >  Not Able to Login to Bitbucket Repo Via Visual Studio Code Using App Password
Not Able to Login to Bitbucket Repo Via Visual Studio Code Using App Password

Time:03-05

I recently set up an app password for bitbucket, since they now require this as of March 1st when I am connecting to a repo via Visual Studio Code on my Mac.

However, I am having difficulty actually now getting connected. With a project loaded in Visual Studio Code which I had already cloned before, I entered the following in the terminal:

git remote set-url origin https://<firstname.lastname>:<app-password>@bitbucket.org/<organization>

Then when I try git push origin feature-branch

I get the following error in the terminal:

remote: Invalid credentials
fatal: Authentication failed for 'https://bitbucket.org/<organization>/'

What am I missing here?

By the way, I got the above directions from here: How to access bitbucket using app password

By the way, I also tried:

git remote set-url origin https://<firstname.lastname>:<app-password>@bitbucket.org/<organization>.git

Also, ideally I'd like to set global credentials, as I will always be targeting the same organization account, but different repos within it. Any ideas how to do this?

CodePudding user response:

In the end, after trying many, many different command line entries, and reading through the not super clear documentation, I was able to get this to work with a Curl:

curl -u "<user>:<appPassword>" "https://api.bitbucket.org/<rootOrg>"

In other words, as an example:

curl -u "bill.smith:h8sdgj0dkdjjf0s00f" "https://api.bitbucket.org/superorg"
  • Related