LoginSignup
6
6

More than 5 years have passed since last update.

githubで鍵の登録

Posted at

githubの鍵認証でパーミッション設定に混乱させられたのでメモ

また、id_rsa以外の鍵を使いたい場合は~/.ssh/configファイルを作成して以下のように設定すればよいらしい。
とりあえず、これでうまくいった。

パーミッションの設定

ディレクトリ(ファイル) パーミッション タイプ
/home/<user name> 755 d
.ssh 700 d
secret key 600 f
config 600 f

configファイルの中身

~/.ssh/config
Host github.com
HostName github.com
User git
IdentityFille ~/.ssh/kke_rsa '各々の秘密鍵'
Port 22

対応する公開鍵はgithubのアカウントに登録されていることを前提にしているので、登録していない人は登録しないとダメです。

6
6
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
6
6