Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

Authentication Fails but Bitbucket is Fine

T P November 21, 2022

I've been using SourceTree for work successfully for the past five months.

Today, when attempting to clone a remote repository, nothing appeared in the search list. I checked my account and refreshed my OAuth token. Authentication OK, green check mark, great. Search still showed nothing.

I spam refresh and *sometimes* a handful of options will appear, but trying to filter the results from there shows nothing. Subsequent searches, even with an empty filter, show nothing until they do very rarely after many attempts.

Attempted to diagnose. Generated an entirely new ssh key, converted it to PUTTY ppk, used that for SourceTree and added the public key to the account on BitBucket (which can see the repository and many others just fine!). Authentication OK. Nothing.

Created an App Password, logged in using HTTPS and Basic. Authentication OK. No search results.

I go to the repository on BitBucket, select Clone, and attempt to clone via Sourcetree. Sourcetree doesn't do anything in response. I download and set up VS Code and attempt to Clone. Also does nothing.

I'm very confused as to how something that was working with no changes suddenly stopped working over the weekend, and why I can see everything perfectly fine, even download repositories directly from BitBucket, but no connected app like SourceTree will authenticate despite everything being linked to the account that can see the repositories.

Does anyone have any ideas?

2 answers

0 votes
Tim Ord November 22, 2022

I've found a work around to being unable to Clone from BitBucket using Sourcetree.

I had to generate the rsa keys from Sourcetree terminal and ensure the agent was running.

Add the public rsa key to BitBucket as normal.

Refresh the OAuth token in Sourcetree.

Test the authentication in SourceTree using Terminal:   "$ ssh -T git@bitbucket.org"

You should then see "authenticated via ssh key.   You can use git to connect to Bitbucket.  Shell access id disabled".

Within Sourcetree select File -> Clone/New -> Click "Remote" icon and you should then see a list of your remote repositories which you can then clone to your local PC.

I still can't get the "Clone using Sourcetree" feature in BitBucket to work as it just opens Sourcetree and does nothing as you reported.

T P November 22, 2022

Thanks for the potential solution! Unfortunately, even though I got the "authenticated via ssh key" bit, the "Remote" option when cloning a repository still shows 0 results.

0 votes
Tim Ord November 22, 2022

I've just got exactly the same problem.  SSH Authentication used to work OK for Cloning repositories from BitBucket using SourceTree, but has now stopped working.  I've also regenerated the keys, but using Terminal in SourceTree I get a "Could not open a connection to your authentication agent" and "git@bitbucket.org: Permission denied (publickey)".  I've not found a solution yet.

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events