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

Why can't I clone in sourcetree?

Hunter Smith
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
February 23, 2023

I connected by remote account in source tree, I can see the repos listed. When I click clone, it takes a long time then eventually said the URL is invalid. I believe this issue is auth related, but since I can see the repos I am not sure why it is not working. I have tried wiping my windows credentials, reinstalling git, reinstalling sourcetree, and cloning from vs code using the atlasian extension, and no joy.

oauth token always seem to work, but cloning always gets credential errors.

Screenshot 2023-02-23 161218.png
Screenshot 2023-02-23 161432.png

1 answer

0 votes
Ben
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
March 30, 2023

G'day Hunter! 

Thank you for contacting Bitbucket Cloud Support.

The most common issue customers are experiencing related to authentication is due to the deprecation of GIT username/password in favour of App Passwords on 01/03/2022:
https://community.atlassian.com/t5/Bitbucket-articles/Announcement-Bitbucket-Cloud-account-password-usage-for-Git-over/ba-p/1948231

You will need to make use of an AppPassword for communicating to GIT via HTTPS.
We have documentation for usage of app passwords at the following link:
https://support.atlassian.com/bitbucket-cloud/docs/app-passwords/#Create-an-app-password
Essentially, when connecting via HTTPS you will use your AppPassword alongside your username seperated with a ":" character.

Therefore if you are authenticating to GIT over HTTPS to push/pull you will need to update your remote URL's to include the AppPassword:

git remote set-url origin https://USERNAME:APP_PASSWORD@bitbucket.org/workspaceID/reposlug.git

The same applies when performing git clone:

git clone https://USERNAME:APP_PASSWORD@bitbucket.org/workspaceID/reposlug.git

I would suggest ensuring also that all stored passwords related to authentication over GIT are cleared from your machine (ie Credential Manager for Windows, Access Keychain for Mac or /etc/shadow folder for Linux).

We have further information related to Sourcetree located at the link below:
https://community.atlassian.com/t5/Sourcetree-articles/Bug-Fix-Sourcetree-for-Windows-authentication-error-when/ba-p/1965968

Cheers!

- Ben (Bitbucket Cloud Support)

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
PERMISSIONS LEVEL
Product Admin
TAGS
AUG Leaders

Atlassian Community Events