zoukankan      html  css  js  c++  java
  • SourceTree

    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)AtlassianSourceTree oolsputty"

    plink git@bitbucket.org

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

    just type "y" and then press enter. 


    C:UsersAdministrator>cd "C:Program Files (x86)AtlassianSourceTree oolsputty"

    C:Program Files (x86)AtlassianSourceTree oolsputty>plink git@bitbucket.org

    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)AtlassianSourceTree oolsputty>plink git@bitbucket.org
    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)AtlassianSourceTree oolsputty>plink git@github.com

    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.

  • 相关阅读:
    HBase Coprocessor 剖析与编程实践
    图数据库实践系列 (一)Neo4J简介与安装
    BootStrap入门教程 (三)
    图数据库实践系列 (三)Neo4j Spatial的REST集成
    BootStrap入门教程 (二)
    R与GIS实践系列Shapefile导入与地图显示
    空间分析读书笔记
    BootStrap入门教程 (四)
    Java并发之线程池的使用浅析
    RSA详解
  • 原文地址:https://www.cnblogs.com/shangdawei/p/5644245.html
Copyright © 2011-2022 走看看