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

Sourcetree Fails on Password When Cloning To Submodule

Giles Hammond December 17, 2013

I have a repository on BitBucket, created by importing the public Sparkle for OSX project from Github.

If I try to clone this to my local machine with Sourcetree everything works fine:

git -c diff.mnemonicprefix=false -c core.quotepath=false -c credential.helper=sourcetree clone --recursive https://MyUsername@bitbucket.org/MyUsername/sparkle.git /Users/Giles/Dropbox/Projects/sparkle

However, if I try and do the same to a submodule within an existing project it fails with a password issue:

git -c diff.mnemonicprefix=false -c core.quotepath=false -c credential.helper=sourcetree submodule add -f https://MyUsername@bitbucket.org/MyUsername/sparkle.git External/Sparkle 

fatal: could not read Password for 'https://MyUsername@bitbucket.org': Device not configured

Does anyone know if I am doing something very wrong here? I am fairly new to Git, Sourcetree and Bitbucket. Perhaps this is a bug though - the password is obviously working when cloning in some instances.

Thank you

17 answers

1 accepted

2 votes
Answer accepted
KieranA
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
January 22, 2014

Sorry everyone, this hasn't fallen on deaf ears.

I believe this is because we're now using a credential helper which appears to not play nicely with checkout of submodules. The credential helper just gets auth details from the keychain, but I'm guessing submodule clones don't work with credential helpers.

It's logged (as mentioned above) at https://jira.atlassian.com/browse/SRCTREE-2029so we can look into it from there. This is a pretty major problem so I'll get on it urgently.

Cheers

thinsoldier
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
July 2, 2015

I still have this problem 1 year and 6 months later.

Fectum December 4, 2015

Still have this problem, almost two years later. Two years, CARL!

jeanfabre December 6, 2015

check my answer for this, it works and is trivial as a workaround, but I agree this should have been fixed 10 times by now.... https://answers.atlassian.com/questions/244606/answers/19139768

thinsoldier
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
May 19, 2016

This problem still exists in May 2016!

julianjpoole December 20, 2016

.... it's been almost 3 years now... just saying..

crwecker January 11, 2017

fwiw, I have the same issue for SubTrees on Windows 10, SourceTree version 1.9.10.0. I get a "fatal: could not read Password" error when I try to pull or add a new https repo as a subtree.

sakisplus February 7, 2017

This problem still exists om Feb 2017!!

Mats Larsson February 26, 2017

Still a issue..

cowlinator September 18, 2017

@Kieran Senior, you stated here that "this is a pretty major problem", but the ticket at https://jira.atlassian.com/browse/SRCTREE-2029 has it listed as "low priority".  Why?

Andrea Piermarteri April 11, 2018

It's 2018, we're still here. I'm not adding other comments, since I won't be nice.

Joseph Grainger September 19, 2018

Started in 2014 now we're here... haha it's September 2018!

badjano December 11, 2018

December 2018, congratulations

julianjpoole December 11, 2018

So the Admin looking after this hasn't been active for like a year now and basically isn't around, the problem hasn't been reassigned and thats why this isn't getting fixed incase anyone is wondering. might need to open a new case.

badjano December 11, 2018

I guess everyone´s moving to ssh, after I read somewhere that ssh fixed it, I changed... no harm done

Greenwald June 22, 2021

2021

11 votes
steven_oglesby March 18, 2014

As a workaround:

Use commandline to get the submodule:

git submodule add <repository url> <local relative path>

(See Progit - 6.6.1 Starting with submodules)

Then when you go back to Sourcetree it picks it up and the credential helper asks you for access to keychain and everything seems to work OK.

Steven

2 votes
jeanfabre July 2, 2015

Hi,

 Just to shime in with the workaround I found, and it works very well and is a no brainer:

1: in the General Preferences of SourceTree, check "Always display full console output"

2: do your submoudle cloning action as you would expect

3: when the error popups up, simply look up the actual call made in the console, and copy paste it in your Terminal, and execute it from there

4: the terminal will prompt you for the password, simply enter it

5: done, you have your submodule implemented.

Explanation: basically it says it can not read the password, because sourcetree when executing the git command fails to forward the password prompt to the user with a UI dialog, that's all. so simply get the git command sourcetree executes for you and execute it manually

Hope this helps while sourceTree addresses the problem.

 

Bye,

 

 Jean

cameronwhite08 December 25, 2016

I can confirm that this worked for me. This issue definitely should have been fixed by now 3 years later!

r618 January 15, 2018

4 years, and counting..

cheers ( & thanks)

1 vote
Andrea Piermarteri April 11, 2018

For even less hassle:
If you tick out "recurse submodule" during cloning of the parent repo, and then you double-click on the submodule, SourceTree is magically able to provide you a form to fill with your password. Which is not rocket science, nor the solution, if someone here is reading...

mo7e August 29, 2018

Thanks. This worked for me. I was unsure whether "tick out" meant tick/check or untick/uncheck, but as the default was set to unticked I ticked it and it worked. 

1 vote
Andrea Piermarteri April 11, 2018

Fix it, please. 11/04/2018, last version still not working. Users need this.

1 vote
btate August 17, 2015

I had this issue on the latest version (2.0.5.2), but I found if I use the ssh link to my submodule instead of the https link it works fine.  

thinsoldier
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
September 30, 2015

More workaround info The Sourcetree UI seems to utilize the *HTTPS* urls (https://thinsoldier@bitbucket.org/thinsoldier/testproject.git) by *default* _whenever you do *anything*_. If you instead manually enter the *SSH* urls (git@bitbucket.org:thinsoldier/testproject.git) *_wherever possible_* (cloning, adding a remote, adding a submodule) then the submodule related activities will succeed. But you of course need to set up an SSH key on your machine and add it your profile on bitbucket.org.

0 votes
jeanfabre May 10, 2015

Same here,

 

 It should really be addressed by now...

0 votes
Luis Fonseca December 8, 2014

Just spent a couple of hours around this only to find that it's not possible. Seems like an essential feature that's being overlooked for some reason... Any news on a fix?

0 votes
Dominique PERETTI November 20, 2014

I've spent an entire day on this and I'm left without any solution. Using Bitbucket hosting + Bitbucket software.

Seriously...

0 votes
Michael Fritz July 23, 2014

Same here, it is a shame.. should have stayed with the old version :-(((

0 votes
KieranA
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
May 5, 2014

Just as an update on this issue, it's because the submodule is on a separate host to the parent repository. The Git auth helper doesn't (or at least, didn't) give enough information to distinguish auth details which fails to provide the password. If the submodule were on the same host it should work OK.

I'm going to look into this one again as the auth model has changed since these problems, so we might be able to address it. When you do this from the terminal it might even fail from there, too.

We're looking into it regardless as we want to see some solution or middle ground. Cheers

Buck Perley May 27, 2014

How's the progress going on this? I'm actually having the same problem on 1.9.2 and the hosts are the same. I have a project tracking a remote on bitbucket and I'm trying to clone in as a submodule another repo stored on bitbucket and getting the same error. Will try the terminal solution and see if that works, obviously would be nice to be able to do it through the SourceTree GUI though.

Buck Perley May 27, 2014

FYI, worked with terminal.

Buck Perley May 27, 2014

Found something that might be related. For some reason, the submodule is causing problems with the deployment setup as well. We're using DeployHQ for automatic deployment of our bitbucket repo but the latest deployment after adding the submodule failed and the error was the exact same I got in SourceTree-

fatal: Authentication failed for...

Followed by the repo https URL.

Bruno Sanches February 20, 2019

I am cloning both the main module and submodule from bitbucket and having trouble with this.

0 votes
Lukasz Margielewski May 4, 2014

Still happens in Version 1.9.1 (1.9.1). Clonning repo works fine, but adding it as submodule gives fatal:

fatal: could not read Password for 'https://username@github.com': Device not configured

Quite annoying - so much effort went into UI redesign and not so much into basic funtionality bugfixes.

0 votes
nirahiel January 22, 2014

Any workaround exists for this bug ?

KieranA
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
January 22, 2014

You could always convert to using subtree. I know that sounds like a convultated answer, but subtree was kind of designed as a replacement for submodules as it's more flexible, and we now support it in SourceTree (for Mac).

I'll be working on a fix regardless though which will get issued for 1.8.1 most likely.

Cheers

nirahiel January 22, 2014

The thing is, i used subtrees before, and that's not really convenient when you have to work with a team. With submodules they know they didnt do something right (like updating a submodule) if they try to clone or pull the repo and make fails. :)

0 votes
Adriano Gonçalves January 8, 2014

Hello.

I'm having the same issue, trying to clone to a submodule from a repository on a local SCMManager server.

SourceTree Version 1.8.0.3 (1.8.0.3) for Mac OSX (10.9.1)

0 votes
Azizur Rahman December 24, 2013

I have logged this as a Critical Bug: SRCTREE-2029

0 votes
Azizur Rahman December 24, 2013

I am getting the same issue as well with SourceTree Version 1.8.0.3 (1.8.0.3)

0 votes
steven_oglesby December 18, 2013

Hello,

I am having the same problem with the latest version of SourceTree (1.8.0.3).

However, on another machine running an older version (1.7.4.1) it works fine.

So I think this is a bug in latest version of SourceTree. How it picks up passwords for cloning submodules no longer seems to be working.

Steven

Giles Hammond December 22, 2013

Thank you Steven - that saves me from thinking I am going mad.

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events