創(chuàng)建如下文件
~/.ssh/config
內(nèi)容
Host github.com
HostName github.com
User git
PreferredAuthentications publickey
IdentityFile ~/.ssh/privateKeyFile
Host git.coding.net
HostName git.coding.net
User git
PreferredAuthentications publickey
IdentityFile ~/.ssh/privateKeyFile
Host git.oschina.net
HostName git.oschina.net
User git
PreferredAuthentications publickey
IdentityFile ~/.ssh/privateKeyFile
~/.ssh/privateKeyFile 對應(yīng)私鑰在本地的位置。
請結(jié)合隔壁教程來看 http://www.reibang.com/p/9317a927e844
~
表示用戶主目錄诗赌,linux/mac表示 /Users/你的名字名字/
, windows下表示 C:\Users\你的名字\