目的
- GitHubとローカルの連携、設定、確認を行う
GitHubの連携
- ローカルで鍵を作成しこちらに登録
$ ssh-keygen -t ed25519
# copy(Mac)してGitHubに登録
$ pbcopy < ~/.ssh/id_ed25519.pub
- 鍵名が違う場合はよしなに編集する
# ~/.ssh/configを作成し追加
Host github github.com
HostName github.com
IdentityFile ~/.ssh/id_ed25519 #自分の鍵ファイル名
User git
- 接続確認
$ ssh -T git@github.com
Hi [GitHub UserName]! You've successfully authenticated, but GitHub does not provide shell access.