gitインストール
//gitインストール
$ brew install git
// gitバージョン確認
$ git --version
gitのIDとパス
//user.nameの設定
git config --global user.name 'Your Name'
//user.emailの設定
git config --global user.email 'email@example.com'
githubの鍵
//SSH認証に使う秘密鍵(id_rsa)と 公開鍵(id_rsa.pub)を生成
$ ssh-keygen -t rsa
//エンター3回くらいで↓
$ ssh-keygen -t rsa
Generating public/private rsa key pair.
Enter file in which to save the key (/Users/(username)/.ssh/id_rsa):
Enter passphrase (empty for no passphrase):
Enter same passphrase again:
違う名前で生成したいときは
$ ssh-keygen -t rsa
Generating public/private rsa key pair.
Enter file in which to save the key (/Users/(username)/.ssh/id_rsa):id_noboo
Enter passphrase (empty for no passphrase):
Enter same passphrase again:
公開鍵をGitHubにアップする
https://github.com/settings/ssh
鍵の中身のコピー
$ pbcopy < ~/.ssh/id_rsa.pub
接続確認
$ ssh -T git@github.com
app getupアプリで管理
参考にさせていただいたページ
https://qiita.com/shizuma/items/2b2f873a0034839e47ce