LoginSignup
1
1

More than 5 years have passed since last update.

GitHub SSH Keyの設定

Posted at

GitHubに登録、リポジトリ公開はできたけど、SSH Keyの設定をしていなかったので設定方法をメモ。

1.公開鍵の作成

$ ssh -keygen -t rsa -c "your_email@example.com
Generating public/private rsa key pair.
Enter file in which to save the key (/Users/XXXXXX/.ssh/id_rsa): 
Enter passphrase (empty for no passphrase): パスフレーズ入力
Enter same passphrase again: 

The key fingerprint is:
フィンガープリント
The key's randomart image is:
+---[RSA 2048]----+

2.公開鍵の登録

GitHub>Account Setting>Add SSH Key
titleは適当に、以下コマンドで公開鍵内容をコピペして登録する。

$cat ~/.ssh/id_rsa.pub
ssh-rsa 公開鍵の内容

登録が完了したら動作確認

$ ssh -T git@github.com
Enter passphrase for key パスフレーズ入力
You've successfully authenticated, but GitHub does not provide shell access.

設定されているメールアドレスに登録メールがくるので、これにて完了。

1
1
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
1
1