githubでの設定
sshキーの設定
cd ~/.ssh
ssh-keygen
ただのファイル名なのでそのままEnterでOK
Enter file in which to save the key (/Users/UserName/.ssh/id_ed25519):
ここで設定したパスワードがそのままgithubにアクセスするパスワードになる
Enter passphrase (empty for no passphrase):
Enter same passphrase again:
出力.txt
Your identification has been saved in /Users/UserName/.ssh/id_ed25519
Your public key has been saved in /Users/UserName/.ssh/id_ed25519.pub
ファイル名を変えた人はid_ed25519
がその入力した名前になっています。
user_naeme/
├ bin/
├ .ssh/
│ ├ id_ed25519
│ ├ id_ed25519.pub #このpubの中身をgithubの設定欄に入力する
│
sshをgithubに入力する
githubの設定/access/sshの設定
毎回パスワードを打たなくて良くする設定
// SSH鍵をssh-agentに登録
ssh-add /Users/user_name/.ssh/id_ed25519
// ここでssh鍵のキーを入力する
// 上記パス(~/.ssh/id_rsa)の場合、下記でも登録可能
ssh-add -K
// 登録されていることを確認する
ssh-add -l
参考記事