Cloning in sourcetree results in 'Login failed due to incorrect login credentials or method. remote'

Norlina_S
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!
January 30, 2023

unable to clone a remote repo with error 'This in not a valid source path'

1 answer

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

G'day Norlina! 

Thank you for contacting Bitbucket Cloud Support.

The most common issue customers are experiencing related to authentication in SourceTree is due to the deprecation of GIT username/password in favour of App Passwords:
https://bitbucket.org/blog/deprecating-atlassian-account-password-for-git-and-bitbucket-api-activity
We have a blog post however which explains the steps to troubleshoot this issue, please follow these accordingly and this should resolve the issue:
https://community.atlassian.com/t5/Sourcetree-articles/Bug-Fix-Sourcetree-for-Windows-authentication-error-when/ba-p/1965968

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 App Password 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 App Password:

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).

Hope this helps.

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