ssh-keygen -t rsa -b 4096 -C "your_email@example.com"

 

Start the SSH agent:

eval "$(ssh-agent -s)"

 

add the new key:

ssh-add ~/.ssh/id_rsa

 

cat (short for "concatenate")

cat ~/.ssh/id_rsa.pub

copy印出來的key備用

 

github:

右上頭像的settings

前面cat出來的key整個貼上去
包含開頭ssh-rsa到結尾email

github in project :

取SSH網址塞進專案裡

git remote set-url origin git@github.com:xxxxxxx

 

測試

ssh -T git@github.com

 

 

 


 

 

文章標籤
全站熱搜
創作者介紹
創作者 MonkeyJ 的頭像
MonkeyJ

程式猴

MonkeyJ 發表在 痞客邦 留言(0) 人氣(11)