Connecting to GitHub with SSH

1 windows環境git

查看是否存在ssh keysgithub

ls -al ~/.sshwindows

2 生成一對公鑰私鑰服務器

(1)ssh-keygen -t rsa -b 4096 -C 「ghou@vmware.com」ssh

(2)測試

liunx and mac 服務器ip

eval 「$(ssh-agent -s)」get

windowsit

eval $(ssh-agent -s)cli

(3)ssh-add ~/.ssh/id_rsa

3 增長一個新的公鑰到github account中

mac

pbcopy < ~/.ssh/id_rsa.pub

window

clip < ~/.ssh/id_rsa.pub

liunx

sudo apt-get install xclip

xclip -sel clip < ~/.ssh/id_rsa.pub

把copy的公鑰添加到github中

4 測試

ssh -T git@github.com

相關文章
相關標籤/搜索