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

 

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)