Created
December 6, 2015 06:51
-
-
Save yysskk/b9da3b96c43cc709ac7c to your computer and use it in GitHub Desktop.
GithubのSSH通信設定 ref: http://qiita.com/anthony1618/items/974c9c55d66a26515651
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$ cd ~/.ssh/ | |
$ ssh-keygen -t rsa -C "メールアドレス" | |
Generating public/private rsa key pair. | |
Enter file in which to save the key (/Users/ユーザー名/.ssh/id_rsa): github_id_rsa | |
Enter passphrase (empty for no passphrase): | |
Enter same passphrase again: | |
Your identification has been saved in github_id_rsa. | |
Your public key has been saved in github_id_rsa.pub. | |
~以下略~ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$ pbcopy < ~/.ssh/github_id_rsa.pub |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Hi {account-name}! You've successfully authenticated, | |
but GitHub does not provide shell access. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$ ssh -vT git@github.com |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$ vi ~/.ssh/config | |
Host github.com | |
HostName github.com | |
IdentityFile ~/.ssh/github_id_rsa | |
User git |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$ ssh -T git@github.com |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Hi {account-name}! You've successfully authenticated, | |
but GitHub does not provide shell access. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Warning: Permanently added the RSA host key for IP address '204.232.175.90' to the list of known hosts. | |
Permission denied (publickey). |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$ vi ~/.ssh/known_hosts |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
~~~~ ファイルの中身 ~~~~ | |
github.com,204.232.175.90 ssh-rsa AAA... | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
eval `ssh-agent` | |
$ ssh-add github_id_rsa(秘密鍵名) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$ ssh git@github.com |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment