SourceTree - 正在检查源... When cloning a repository, "Checking Source" spins forever

Posted ImProgrammer

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了SourceTree - 正在检查源... When cloning a repository, "Checking Source" spins forever相关的知识,希望对你有一定的参考价值。

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 [email protected] 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.

 

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.

CommentAdd your comment...

This worked for me.  

I selected system git right after install.  But, switching back worked.  Life saver! 

 

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 [email protected]

When you are prompted to save Bitbucket as a known host, 

just type "y" and then press enter. 


C:\Users\Administrator>cd "C:\Program Files (x86)\Atlassian\SourceTree\tools\putty"

C:\Program Files (x86)\Atlassian\SourceTree\tools\putty>plink [email protected]

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 2048 11:22:33:44:55:66:77:88:99:AA:BB:CC:DD:EE:FF:00
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

FATAL ERROR: Server unexpectedly closed network connection


 

C:\Program Files (x86)\Atlassian\SourceTree\tools\putty>plink [email protected]
Using username "git".
Server refused to allocate pty
logged in as UserName.

You can use git or hg to connect to Bitbucket. Shell access is disabled.


 

C:\Program Files (x86)\Atlassian\SourceTree\tools\putty>plink [email protected]

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 2048 11:22:33:44:55:66:77:88:99:AA:BB:CC:DD:EE:FF:00
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".
Server refused to allocate pty
Hi UserName! You‘ve successfully authenticated, but GitHub does not provide shell access.

 

以上是关于SourceTree - 正在检查源... When cloning a repository, "Checking Source" spins forever的主要内容,如果未能解决你的问题,请参考以下文章

SourceTree 克隆 - 带有端口的源路径导致无效的源路径/ URL

SourceTree2.6.2 clone 出错,提示:无效源路径

Mac版 Sourcetree 提示“这是一个无效源路径/URL”的解决办法

急急急,用sourcetree 克隆的时候一直提示无效的源路径 这是啥意思啊 如图

正对开源工作的源码管理web (ssh协议管理) 本地如何使用SourceTree 管理

如何 rebase 和解决 sourcetree 中的冲突