Showing results for 
Search instead for 
Did you mean: 
Sign up Log in
Deleted user
0 / 0 points
badges earned

Your Points Tracker
  • Global
  • Feed

Badge for your thoughts?

You're enrolled in our new beta rewards program. Join our group to get the inside scoop and share your feedback.

Join group
Give the gift of kudos
You have 0 kudos available to give
Who do you want to recognize?
Why do you want to recognize them?
Great job appreciating your peers!
Check back soon to give more kudos.

Past Kudos Given
No kudos given
You haven't given any kudos yet. Share the love above and you'll see it here.

It's not the same without you

Join the community to find out what other Atlassian users are discussing, debating and creating.

Atlassian Community Hero Image Collage

Trying to clone repository, can't supply password


I'm working in SourceTree and I cannot clone my repository. Here's what I enter into the dialog:

trying to clone promcom repo.png

But it tells me "This is not a valid source path / URL". When I click on the Details button, it tells me "Invalid username or password...".

I have confirmed that the url is correct and that my username is correct. I'm trying to figure out how to supply the password. Can you please help me figure out how to supply the password.


2 answers

0 votes
minnsey Atlassian Team Feb 14, 2018


It looks like you are using an older version are you able to update to the latest build form ?

Hi Michael,

I updated to the latest version of SourceTree. In addition to that, I entered the URL without my username. This time it prompted me for login credentials.

But now my login credentials won't work! I keeps re-prompting me! I should enter the same login credentials that I use to log into my BitBucket account, shouldn't I?


The error I get is slightly different now:

Command: git -c diff.mnemonicprefix=false -c core.quotepath=false ls-remote
Error: Logon failed, use ctrl+c to cancel basic credential prompt.
error: unable to read askpass response from 'C:\Users\gshah\AppData\Local\SourceTree\app-2.4.7\tools\Askpass.exe'
bash: /dev/tty: No such device or address
error: failed to execute prompt script (exit code 1)
fatal: could not read Password for '': No error

This seems to say it is trying to get the password from Askpass.exe. <-- Not sure what that it or why it's failing.

Like demijan.juric likes this
minnsey Atlassian Team Feb 15, 2018


It is better to use a URL that contains you username. Sourcetree relies on Git to andle authorization. Git does that by using the Git Credential Manager, GCM, that is bundled with Git for Windows.

Git alone only has the ability to ask for a password when run from the command line, the GCM provides the popup GUI dialogs that allow git processes triggered by Sourcetree to interactively prompt the user for credentials.

The GCM stores its credentials in the Windows Credential Manager, also referred to the Vault, you can access this through Windows Settings. The GCM creates/uses entries prefixed by 'git:'.

If you use a URL without a username,  e.g., then the GCM will store credentials against git: . This means anytime Git/GCM need to find credentials for use against bitbucket it will find and use these credentials. This works fine unitl you are using more than one account to access bitbucket. When that happens, and you are using URLs without usernames, Git/GCM will keep finding the current credentials and trying to use them, if they are correct for the repo you are trying to access they will work, if they are wrong Git/GCM will delete them, prompt you for the correct ones and then store the new ones. If you switch between repos and accounts this process will repeat endlessly.


If you use URL that do include usernames then the credentials are stored keys against, git:, so each time you switch repos and accounts/usernames and you are using URLs with names Git/GCM will find the exact match.

As for Askpass.exe that should be installed at C:\Users\gshah\AppData\Local\SourceTree\app-2.4.7\tools. It is part of the Sourcetree install. Askpass.exe is a last chance fallback for authentication it should only appear if the GCM failed to get credentials it can use.

Hi Michael, thanks for the detailed feedback. I managed to solve the problem. The credentials prompt would always come up 3 times. What I didn't recognize at first was that on the third time, my username was auto-filled. This made me wonder: if it's recognizing my username on the third try, maybe it will also recognize my password. So I entered my password on the third try and presto! SourceTree has now cached my credentials and I'm able to connect to my repository automatically with my username in the url.

Hello -- I'm also encountering this issue when trying to connect to github when using sourcetree. Do I need to use a URL with my username in it? If so, what's the format that I should use? 

sourcetree connect error.png

Suggest an answer

Log in or Sign up to answer
Community showcase
Published in Sourcetree

Tip from the team: configure your repos for hosting goodness!

Supported Platforms macOS Windows We recently introduced support for additional hosting services such as GitHub Enterprise, GitLab (Cloud, Community Edition, Enterprise Edition), and...

3,387 views 4 5
Read article

Community Events

Connect with like-minded Atlassian users at free events near you!

Find an event

Connect with like-minded Atlassian users at free events near you!

Unfortunately there are no Community Events near you at the moment.

Host an event

You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events

Events near you