SourceTree在绑定SSH后,第一次使用时会出现下述代码

1
2
3
4
5
6
7
8
9
10
11
12
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 **:**:**:**:**:**:**:**:**:**:**:**:**:**:**:**
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)

此时需要使用putty的plink程序,执行:

1
plink git@github.com

输入y后即可解决

Plink在SourceTree安装目录下提供 SourceTree\app-3.4.12\tools\putty,具体看使用的版本,或者自行下载Putty也可。
主要原因是SourceTree执行命令的时候没有提供交互窗口,只能显示结果,所以在终端使用命令拉取代码进行交互也可以解决。