1、执行命令:git pull –progress –no-rebase -v “origin”,报错,如图1
fatal: unable to access
‘https://github.com/shuijingwan/yii2-starter-kit.git/’: Unknown SSL
protocol error in connection to github.com:443

fatal:
unable to access
‘https://github.com/shuijingwan/yii2-starter-kit.git/’: Unknown SSL
protocol error in connection to github.com:443
2、决定采用SSH的方式连接,由于Git Bash与TortoiseGit皆有可能使用,因此使用TortoiseGit自带的PuTTYgen工具生成密钥,如图2

决定采用SSH的方式连接,由于Git Bash与TortoiseGit皆有可能使用,因此使用TortoiseGit自带的PuTTYgen工具生成密钥
3、打开之后,点击Generate按钮,然后在生成的过程中需要在key框中时刻移动鼠标,目的是生成一些随机数,如图3

打开之后,点击Generate按钮,然后在生成的过程中需要在key框中时刻移动鼠标,目的是生成一些随机数
4、将生成的公钥添加至GitHub上,如图4

将生成的公钥添加至GitHub上
5、在GitHub上添加的公钥列表,如图5

在GitHub上添加的公钥列表
6、选择Save private key,弹出如下对话框,选择是,如图6

选择Save private key,弹出如下对话框,选择是
7、保存TortoiseGit支持的私钥至C:\Users\Administrator\.ssh\private.ppk,如图7

保存TortoiseGit支持的私钥至C:\Users\Administrator\.ssh\private.ppk
8、选择Save public key,保存TortoiseGit支持的公钥至C:\Users\Administrator\.ssh\authorized_keys(无扩展名),如图8

选择Save public key,保存TortoiseGit支持的公钥至C:\Users\Administrator\.ssh\authorized_keys(无扩展名)
9、运行TortoiseGit软件包中的Pageant程序,如图9

运行TortoiseGit软件包中的Pageant程序
10、右键选择Windows桌面右下角(通知区域)的图标,出现如下菜单,如图10

右键选择Windows桌面右下角(通知区域)的图标,出现如下菜单
11、选择Add Key菜单栏,出现Select Private Key File文件选择框,选择之前生成的对应的私钥文件(.ppk)文件,配置完成,如图11

选择Add Key菜单栏,出现Select Private Key File文件选择框,选择之前生成的对应的私钥文件(.ppk)文件,配置完成
12、至此,TortoiseGit支持的SSH连接已经配置完毕,接下来继续配置Git Bash支持的连接
13、现在已经拥有TortoiseGit支持的Putty私钥了,如果要在Git Bash下使用,需要拥有OpenSSH的私钥,只需要执行转化就可以
14、点击菜单Conversions->Export OpenSSH Key,如图12

点击菜单Conversions->Export OpenSSH Key
15、保存Git Bash支持的私钥至C:\Users\Administrator\.ssh\id_rsa,如图13

保存Git Bash支持的私钥至C:\Users\Administrator\.ssh\id_rsa
16、测试在TortoiseGit中的支持,将origin的URL修改为:git@github.com:shuijingwan/yii2-starter-kit.git,保存,如图14

测试在TortoiseGit中的支持,将origin的URL修改为:git@github.com:shuijingwan/yii2-starter-kit.git,保存
17、TortoiseGit执行拉取操作,如图15

TortoiseGit执行拉取操作
18、TortoiseGit拉取成功,如图16

TortoiseGit拉取成功
19、在Git Bash中,再次执行github.com上的git pull,拉取成功,如图17

在Git Bash中,再次执行github.com上的git pull,拉取成功