轉載 git Unknown SSL protocol error in connection to github.com:443
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
![技術分享](http://www.shuijingwanwq.com/wp-content/uploads/2016/11/1.png)
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
![技術分享](http://www.shuijingwanwq.com/wp-content/uploads/2016/11/2.png)
決定采用SSH的方式連接,由於Git Bash與TortoiseGit皆有可能使用,因此使用TortoiseGit自帶的PuTTYgen工具生成密鑰
3、打開之後,點擊Generate按鈕,然後在生成的過程中需要在key框中時刻移動鼠標,目的是生成一些隨機數,如圖3
![技術分享](http://www.shuijingwanwq.com/wp-content/uploads/2016/11/3.png)
打開之後,點擊Generate按鈕,然後在生成的過程中需要在key框中時刻移動鼠標,目的是生成一些隨機數
4、將生成的公鑰添加至GitHub上,如圖4
![技術分享](http://www.shuijingwanwq.com/wp-content/uploads/2016/11/4-1.png)
將生成的公鑰添加至GitHub上
5、在GitHub上添加的公鑰列表,如圖5
![技術分享](http://www.shuijingwanwq.com/wp-content/uploads/2016/11/5.png)
在GitHub上添加的公鑰列表
6、選擇Save private key,彈出如下對話框,選擇是,如圖6
![技術分享](http://www.shuijingwanwq.com/wp-content/uploads/2016/11/6.png)
選擇Save private key,彈出如下對話框,選擇是
7、保存TortoiseGit支持的私鑰至C:\Users\Administrator\.ssh\private.ppk,如圖7
![技術分享](http://www.shuijingwanwq.com/wp-content/uploads/2016/11/7.png)
保存TortoiseGit支持的私鑰至C:\Users\Administrator\.ssh\private.ppk
8、選擇Save public key,保存TortoiseGit支持的公鑰至C:\Users\Administrator\.ssh\authorized_keys(無擴展名),如圖8
![技術分享](http://www.shuijingwanwq.com/wp-content/uploads/2016/11/8.png)
選擇Save public key,保存TortoiseGit支持的公鑰至C:\Users\Administrator\.ssh\authorized_keys(無擴展名)
9、運行TortoiseGit軟件包中的Pageant程序,如圖9
![技術分享](http://www.shuijingwanwq.com/wp-content/uploads/2016/11/9.png)
運行TortoiseGit軟件包中的Pageant程序
10、右鍵選擇Windows桌面右下角(通知區域)的圖標,出現如下菜單,如圖10
![技術分享](http://www.shuijingwanwq.com/wp-content/uploads/2016/11/10.png)
右鍵選擇Windows桌面右下角(通知區域)的圖標,出現如下菜單
11、選擇Add Key菜單欄,出現Select Private Key File文件選擇框,選擇之前生成的對應的私鑰文件(.ppk)文件,配置完成,如圖11
![技術分享](http://www.shuijingwanwq.com/wp-content/uploads/2016/11/11.png)
選擇Add Key菜單欄,出現Select Private Key File文件選擇框,選擇之前生成的對應的私鑰文件(.ppk)文件,配置完成
12、至此,TortoiseGit支持的SSH連接已經配置完畢,接下來繼續配置Git Bash支持的連接
13、現在已經擁有TortoiseGit支持的Putty私鑰了,如果要在Git Bash下使用,需要擁有OpenSSH的私鑰,只需要執行轉化就可以
14、點擊菜單Conversions->Export OpenSSH Key,如圖12
![技術分享](http://www.shuijingwanwq.com/wp-content/uploads/2016/11/12.png)
點擊菜單Conversions->Export OpenSSH Key
15、保存Git Bash支持的私鑰至C:\Users\Administrator\.ssh\id_rsa,如圖13
![技術分享](http://www.shuijingwanwq.com/wp-content/uploads/2016/11/13.png)
保存Git Bash支持的私鑰至C:\Users\Administrator\.ssh\id_rsa
16、測試在TortoiseGit中的支持,將origin的URL修改為:[email protected]:shuijingwan/yii2-starter-kit.git,保存,如圖14
![技術分享](http://www.shuijingwanwq.com/wp-content/uploads/2016/11/14.png)
測試在TortoiseGit中的支持,將origin的URL修改為:[email protected]:shuijingwan/yii2-starter-kit.git,保存
17、TortoiseGit執行拉取操作,如圖15
![技術分享](http://www.shuijingwanwq.com/wp-content/uploads/2016/11/15.png)
TortoiseGit執行拉取操作
18、TortoiseGit拉取成功,如圖16
![技術分享](http://www.shuijingwanwq.com/wp-content/uploads/2016/11/16-1.png)
TortoiseGit拉取成功
19、在Git Bash中,再次執行github.com上的git pull,拉取成功,如圖17
![技術分享](http://www.shuijingwanwq.com/wp-content/uploads/2016/11/16.png)
在Git Bash中,再次執行github.com上的git pull,拉取成功
轉載 git Unknown SSL protocol error in connection to github.com:443