&tag(github/はじめの一歩);
$ ssh-keygen -t rsa -C "[email protected]"
mv ~/.ssh/id_rsa ~/.ssh/id_rsa.src256@github
$ cat ~/.ssh/id_rsa.pub | pbcopy
ssh -T [email protected] -i ~/.ssh/id_rsa.src256@github
Hi src256! You've successfully authenticated, but GitHub does not provide shell access.
/.ssh/configを使って簡略化†
[edit]Host githubsrc256 User git Hostname github.com IdentityFile ~/.ssh/id_rsa.src256@github
Host github.com IdentityFile ~/.ssh/some_id.ppk IdentityFile ~/.ssh/another_id.ppk
Host github_a User git Hostname github.com IdentityFile ~/.ssh/user_a.ppk IdentitiesOnly Yes Host github_b User git Hostname github.com IdentityFile ~/.ssh/user_b.ppk IdentitiesOnly Yes
machine github.com login src256 password xxxxxxx
[email protected]:src256/testrepo.git
vi README.txt git add . git commit -m "add README.txt"
git push