git
鍵作成
terminal$ cd $ mkdir ~/.ssh && cd ~/.ssh $ ssh-keygen -t rsa -b 4096 -C "your_email@example.com" $ Generating public/private rsa key pair. $ Enter file in which to save the key (/Users/(username)/.ssh/id_rsa):id_github_"your_name"_rsa $ Enter passphrase (empty for no passphrase): $ Enter same passphrase again:
設定
terminal
$ git config --global user.name "your_name"
$ git config --global user.email your_email@example.com
github
- 公開鍵の確認
terminal
$ vi ~/.ssh/id_github_"your_name"_rsa.pub
$ 上記の中身をコピー
接続確認
terminal$ mkdir ~/.ssh/config $ vi ~/.ssh/config Host github github.com HostName github.com IdentityFile ~/.ssh/id_github_"your_name"_rsa User git $ ssh -T github