github 網站新建 repository ( 略 )
github 設置電腦的 ssh key
通過
ssh-keygen
命令創建新的 key
Generating public/private rsa key pair.
Enter file in which to save the key (/Users/akiller/.ssh/id_rsa):
這裏輸入 lenzener
(你要用的key名稱), 後面的直接回車
然後會在 ~/.ssh/
下生成 id_ras_lenzener.pub
列表內容
設置電腦端本地的 config
通過編輯~/.ssh/config
文件, 在文件的末尾加入
Host github-lz
HostName github.com
User git
IdentityFile ~/.ssh/id_rsa_lenzener
通過 ssh 把 github 新建的 repository clone 下來
git clone git@github-lz:lenzener/tf.git
下面就是正常的git操作了.