sshフォルダに行く
$ cc ~/ssh
鍵を作成する
$ ssh-keygen -t rsa
Generating public/private rsa key pair.
Enter file in which to save the key (/Users/home/.ssh/id_rsa): hoge
Enter passphrase (empty for no passphrase):
Enter same passphrase again:
Your identification has been saved in hoge.
Your public key has been saved in hoge.pub.
pbcopy < ~/.ssh/hoge.pub
configファイルに以下の情報を追記
Host host-name
User git
Port 22
HostName github.com
IdentityFile ~/.ssh/hoge
TCPKeepAlive yes
IdentitiesOnly yes
接続テスト
$ ssh -T host-name
リポジトリにアクセスするときは…
git@host-name:username/git-test.git