R's Workshop

Add SSH key to GitHub Account

紀錄在 GitHub 上新增 SSH key 的方法, 省去 clone 和 push 時打密碼的麻煩.

Local Host Configutation

建立 SSH keys

# Create rsa key with 4096 bits
$ ssh-keygen -t rsa -b 4096

~/.ssh/config 新增 GitHub 連線資訊

Host github
    HostName github.com
    User git
    IdentityFile ~/.ssh/id_rsa

GitHub Configuration

基本上參考官網的說明就可以了

Cline Repos

設定好後 clone / push 就不需要打密碼了. 也可以直接 clone GitHub 提供的 SSH link.

$ git clone git@github.com:borting/borting.github.io.git

Reference

GitHub