When cloning a repository, "Checking Source" spins forever
Asked by Ty Underwood:

I am trying to clone a repository, my OpenSSH is set up correctly and I can do everything fine in Git Bash. But when I put in the git@ address in SourceTree the Checking Source loading icon just spins forever and doesn't allow me to do anything.

Similarly, if I clone in Bash and then add the repo as a bookmark, Fetching the master branch also never completes and just shows the loading bar forever.


Answers:
author: SysDev Licensing
body: I had this problem today and spent almost all of it trying to work out what the issue is. To be clear this only occurs, for me, when using SourceTree with Bitbucket, over ssh and using Putty, not OpenSSH.

The problem appears to be that Putty has no known host for Bitbucket. Typically, Putty stores these in the registry. Despite this, SourceTree does not prompt for you to add this entry so it seems that this is a bug in SourceTree.

To get this to work, you need to connect to Bitbucket, using the same plink that is distributed with SourceTree, on the command line. This will then correctly prompt you to save Bitbucket as a known host. Afterwards, SourceTree will start working properly when you clone.

For me this involved running the following in a Windows command prompt:

```
cd "C:\Program Files (x86)\Atlassian\SourceTree\tools\putty"
```

```
plink git@bitbucket.org
```

When you are prompted to save Bitbucket as a known host, just type "yes" and then press enter.

comments: author: vkuhn
body: thanks for this one. worked for me with git@git.assembla.com


author: Fountainity
body: It works!


author: Lukas Beranek
body: Worked like a charm!


author: kenrocha
body: Worked for me when connecting to my company's git server. Thanks!


author: alexandrepeluchi
body: Thanks for this, worked!


author: impact45
body: Thank you, this worked perfectly.


author: dwm1945
body: I had the same problem, worked this out the hard way. Further confused because sometimes the putty agent can be killed with task manager and a prompt will be displayed to add the host key.

From my experience, I'd add the suggestion that it may be necessary to kill the putty agent and restart source tree.


author: skybox888
body: Thank you, it worked perfectly


author: Robert Eastham
body: Star! - Thanks


author: jlundy2
body: Worked!


author: Johnny Davidsen Poulsen
body: Thank you very much..


author: nicolas_r
body: You saved me hours of searching, thank you so much!


author: nicolas_r
body: You saved me hours of searching work. Thank you so much!


author: Tan Dat
body: Wow! It work perfectly! Thank you so much!


author: MuneebShahid
body: Thank You for this may God bless you


author: Marek Smoli?ski
body: I'm Marek Smoli?ski and I approve this answer!


author: jose huaman valqui
body: Thank you. After an hour of trying to solve the problem I found your answer and I'm glad to say that it was the right one.


author: Bram_Van_Helleputte
body: perfect!


author: Jeremy Newton
body: I tried this and I got:

The server's host key is not cached in the registry. You  
have no guarantee that the server is the computer you  
think it is.  
The server's rsa2 key fingerprint is:  
ssh-rsa XXXX xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx (real fingerprint removed by me)  
If you trust this host, enter "y" to add the key to  
PuTTY's cache and carry on connecting.  
If you want to carry on connecting just once, without  
adding the key to the cache, enter "n".  
If you do not trust this host, press Return to abandon the  
connection.  
Store key in cache? (y/n) y  
Using username "git".

but after typing yes to Store Key in Cache I get

FATAL ERROR: Disconnected: No supported authentication methods available (server sent: publickey)


author: Anjali Gulati
body: Hi,

were you able to find a solution ? i am facing the same issue. kindly let me know.


author: Vanishree KS
body: Under the Tools menu , select Options. Goto General tab..make sure you have selected SSH Client as "OpenSSH". This should solve the problem.


author: Sarge Trubix
body: Hello, I had the same problem "Checking Source" spins forever.

But nothing in this topic helped me. To be honest I did not understand half of the answers. ![cheeky](/html/@FAF1B8ED81FE63CF2DF635B2383CF9FB/images/emoticons/cheeky.png "cheeky")

What helped me - I had a direct address link to git, for example like this:

[ssh://bla@bla-bla-bla.net:0123/BlaFolder/Bla.git](ssh://git@repo.snmtech.net:5022/aquapolis/aquapolis-game.git)

I cut it short, leaving only port, like this:

[ssh://bla@bla-bla-bla.net:0123/](ssh://git@repo.snmtech.net:5022/aquapolis/aquapolis-game.git)

And only after this, SourceTree asked me about key cache or whatever. And after I checked "yes", I've been able to write full direct adress to git and it accepted.

comments: author: carl_jabido
body: Cheers mate. This fixed my problem after two days of trying.


author: Bill Scully
body: Thank-you, this worked for me.


author: vsmash
body: Sarge, well done mate. You ended the pain.


author: SaranshKejriwal
body: You're a lifesaver Sarge...Thanks a ton


author: Pranav Gandhi
body: Good Stuff..worked for me as well! The only thing to be cautious is prompt for accepting new host does not pop up on the top of all windows, one needs to do **Alt+Tab**and search for it.


author: Gusti Raditia Madya
body: Works like a charm! Thanks!


author: Mike LaFleur
body: When this occurred for me, it turned out that there was an authentication prompt that didn't pop up all the way (was hidden behind some other windows).

comments: author: Kapil P
body: @Mike LaFleur True...Please minimize all ur windows... just have ur source tree while u work on... and when u hit the infinite loop... u wull see login window for credentials on background


author: Jordan Rhode
body: Thanks!


author: Jean-Louis Herman
body: Same for me


author: Chris Hartley
body: What I found is that in windows when using the Putty SSH option, that there were multiple plink.exe processes running.

When closing them in (sysinternals) Process Explorer, they tell what the issue is and let you fix it (eg. server key not in cache)

comments: author: dwm1945
body: This approach doesn't always work as killing plink doesn't always provide the prompt. See my 3/9/16 comment and endorsement of command line execution of plink.exe.


author: Ciaran Fitzpatrick
body: Thanks this solved it for me


author: Sergio Leal
body: Thanks, it worked for me


author: Matt Falbo
body: If you are using SSH and System Git, try using the embedded version of Git. Once source tree recognizes your RSA key properly you should be able to switch back to System Git.

I just ran into this problem when setting up a new machine. I was using system git and generated my RSA keys from the command line as well as a .ppk using puttygen. My keys were properly added to both Source Tree and bitbucket, also all necessary known_hosts were added in my .ssh directory. Everything worked fine from the command line, but Source Tree could not clone repos (stuck at checking source forever). For whatever reason the only way to acknowledge the RSA key in Source Tree was to download and use embedded Git (an authorization window finally popped up in the Source Tree UI). Everything has worked fine since.

comments: author: Scott harwell
body: This worked for me. I selected system git right after install. But, switching back worked. Life saver!


author: Roseanne Curtin
body: I've been having trouble with this too. It just looked like the following (pathnames removed) and would spin endlessly.

image2015-9-17 15:42:28.png

But when I change it from SSH to HTTP in the dropdown in Stash it works:

image2015-9-17 15:45:7.png

I have reproduced this - when SSH is selected I have the problem above but when I select HTTP in that dropdown it works.

[](https://community.atlassian.com/t5/Sourcetree-questions/When-cloning-a-repository-quot-Checking-Source-quot-spins/qaq-p/16845?attachment-id=6564){#link_1175fcd047ee65}  
[](/tnckb94959/attachments/tnckb94959/sourcetree-questions/485/1/image2015-9-17%2015%3A40%3A59.png){#display_1175fcd047ee65_0}  
[](https://community.atlassian.com/t5/Sourcetree-questions/When-cloning-a-repository-quot-Checking-Source-quot-spins/qaq-p/16845?attachment-id=6565){#link_1175fcd047ee65_0}  
[](/tnckb94959/attachments/tnckb94959/sourcetree-questions/485/2/image2015-9-17%2015%3A45%3A7.png){#display_1175fcd047ee65_2}  
[](https://community.atlassian.com/t5/Sourcetree-questions/When-cloning-a-repository-quot-Checking-Source-quot-spins/qaq-p/16845?attachment-id=6566){#link_1175fcd047ee65_1}  
[](/tnckb94959/attachments/tnckb94959/sourcetree-questions/485/3/image2015-9-17%2015%3A42%3A28.png){#display_1175fcd047ee65_4}

comments: author: HyunseoYang
body: it worked. thx.


author: Harvey Chen
body: For MAC config.

My case is that I am using the source tree to clone projects from gitlab.

This case happened because source tree does not recoginze the ssh key generated by others(because source tree default support Putty/Plink), while I generated my ssh key by my self.

Solutions: (for example)

```
//type this command in Terminal
ssh -T git@gitlab.xxx.com

//if returns 
//Hi XXX! You've successfully authenticated, xxx
//means successfully loaded

//if not: please type
ssh-add -K \~/.ssh/id_rsa //here is your own ssh key

//under .ssh directory make a new file 'config'
//inside the config file input contents as:

Host 'git@gitlab.xxx.com'
HostName 'git@gitlab.xxx.com'
PreferredAuthentications publickey
IdentityFile \~/.ssh/id_rsa?your private key path?//retry the command below
ssh -T git@gitlab.xxx.com



//Then the key should already be added, you can clone via sourceTree by git.
refer to link: https://blog.csdn.net/Gooooa/article/details/83903814
```


author: Bonny_Sentrosi
body: Thanks, closing the app, reopening and entering the password in the command line worked.


author: RonaK Bhagchandani
body: I have face the same problem. So, even you can clone the project using HTTP url. There is no need for ssh keys like stuff. Just check in tools-\>options-\>git tab-\> select system git instead of embedded git. Then try to check http url.


author: Brendan Simon
body: When is this going to be fixed? It's such a PITA to run plink.exe, especially with v2.4.8 and plink in in users home directory in \`\~/AppData/Local/SourceTree/app-2.4.8/tools/putty/\` directory !!

Surely there must be a way for SourceTree to prompt the user to do something, or make the connection or store the keys.

Such a time waster and sooooo frustrating !!!


author: David Parham
body: Hao - interesting - when i **removed** the ssh from the URL, only then then i get the msg to say, "This is a Git Repository". the field was prefaced by a "URL" label, then the field itself merely wanted the url without the ssh://.


author: dwm1945
body: See the answers below ... if they don't work, then report what you actually tried. Yours is the first comment in months where it wasn't a thanks, that worked for me ...


author: Morten Nielsen
body: I have the problem too. Pull, push and fetch never completes. It just spins and spins. It happens with all my repos on the specific PC. Other PCs doesn't do it with the same repos.

If I open up the terminal and perform the command there, things work great, so git seems to be just fine. Seems to be pointing to something in SourceTree getting corrupted. Last time I experienced this, I had to do a full reinstall to get it back to normal for a while (the local clones were kept, so It can't be something in the clones)


author: psmithateh
body: What works for me is to first use Putty to manually attach to the server. Once the ssh key gets saved in the Registry, the endless "Checking Source" goes away and I get prompted for a password.

This is when using putty (obviously) and attaching to a private repository, not a service like BitBucket


author: hao zhang
body: I have the exactly same problem. I fixed it by adding ssh:// to the url


author: onstottj
body: I was having this problem until I went into Tools --\> Options and changed "SSH Client" to OpenSSH. OpenSSH comes with Git, and you can run "ssh-keygen" from C:\\Program Files\\Git\\usr\\bin, for example.

comments: author: Vanishree Katenahalli Shivarudraiah
body: Thanks very much..the above step worked for me.


author: Lukas Beranek
body: Looks like answer from @SysDev Licensing is the correct one. How to verify you are having the same issue:

(assuming that you can clone your git repo from command line and push to bitbucket)

1. Clone your repo using Git Bash
2. Open working directory in Sourcetree
3. Make changes, commit them
4. On push, click advanced to see output
5. If you see ssh "host verification" dialog, you're having the same issue

then

```
cd "C:\Program Files (x86)\Atlassian\SourceTree\tools\putty"plink git@bitbucket.org
```

(credit goes to @SysDev Licensing)


author: luky buky
body: same problem here


author: Faton Sopa
body: Hi guys,

I'm experiencing the same issue.

The 'owner" select box keeps loading forever and ever :smile:

Screen Shot 2014-11-05 at 9.03.52 AM.png

I followed the advices here <https://confluence.atlassian.com/pages/viewpage.action?pageId=270827678> as it seams to be something related to public and private keys, but it didn't help. I managed to go until the 5'th step but the file \~/.hgrc does not excist into my user directory. Any suggestion?

<br />

Thanks,

Faton  
[](https://community.atlassian.com/t5/Sourcetree-questions/When-cloning-a-repository-quot-Checking-Source-quot-spins/qaq-p/16845?attachment-id=11129){#link_1175fd27ea2c1b}  
[](/tnckb94959/attachments/tnckb94959/sourcetree-questions/481/1/Screen%20Shot%202014-11-05%20at%209.03.52%20AM.png){#display_1175fd27ea2c1b_0}


author: Yulian Matev
body: I had the same problem. For me the fix was to configure a proxy server:

* Inside Tools-\>Options-\>Network I changed configuration to "Use custom proxy settings". Set Server and Port
* Check "Add proxy server configuration to Git/Mercurial


author: Stephan Koops
body: I've had the same issue, and I configured the public and the private key to be used for SSH. After fix that everything works finde.


author: Rick Henrikson
body: I'm having the same problem - infinite "Checking source..." while trying to clone a repo. I can even click on the browse icon to the right, and it will find the hosted repo (after asking for username and password), and says it is able to connect. However, selecting these hosted repos from the browse screen just brings me back to the original screen with the infinite "Checking source..." and unclickable "Clone" button.

comments: author: Kelly Schoenhofen
body: What "fixed" the issue for me on every dev's workstation that had issues was to uninstall every old version of git \& git toolset \&, reboot, then install git 1.83/1.84 and re-install SourceTree. So no real root cause that I ever pinned down, and I even lost the energy to troubleshoot it. In one instance I found a repo just wouldn't stop acting squirrely and I had to do a clone --bare, delete it from Stash, and then recreate it and do a push --mirror and then everyone was fine.


author: Kelly Schoenhofen
body: We're having the same trouble, but I'm wondering if something is interfering with Sourcetree.

Is there a debug mode where we can see a detailed view of what is going on?


author: Ty Underwood
body: Unfortuantely it is a private repo in my company, using Beanstalk, it seems to happen with all repos. I think I just need to fully uninstall SourceTree and reinstall, but regardless of what tools I use there seems to be configuration files and stuff still left in the registry because it knows my settings from the last install when I start it up.

Can you tell me how to fully uninstall SourceTree without a trace so I can install it and try again?


author: stevestreeting
body: My initial reaction was authentication but if it spins forever when you just import the existing clone it can't be that.

Is the repo public so we can take a look? I've never seen this happen before.

Does it happen with all repositories for you or just this one?