Ed25519鍵の生成
ssh-keygen -t ed25519 -C "your_email@example.com" -f ~/.ssh/github
SSH Config作成
~/.ssh/config
Host github.com
HostName github.com
User git
IdentityFile ~/.ssh/github
IdentitiesOnly yes
AddKeysToAgent yes
公開鍵Githubに登録
cat ~/.ssh/github.pub
- New SSH key
- Title: 任意
- Key type: Authentication Key
- Key: 公開鍵貼り付け
接続テスト
ssh -T git@github.com
# Hi your-username! You've successfully authenticated, but GitHub does not provide shell access.