0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 3 years have passed since last update.

Mac から git clone を ssh で行うときに ~/.ssh/github という秘密鍵を読み込もうとするときの対処方

Posted at

#経緯
先日、新しく与えられたMacを基に開発環境を構築しようと思い、すでにあるレポジトリから ssh で git clone を行ったが、 ~/.ssh/github という秘密鍵を読み込もうとした。

#対処方法
ターミナルより下記コマンドを実行

$ ssh-add ~/.ssh/id_rsa

登録されていることを確認するときは -L

ssh-add -L

削除するには -D をつければよい

$ ssh-add -D

#あとがき
~/.ssh/config を編集する方法もあったのかもしれないが、そもそも git clone コマンドで実行するため、 config が関係していないと考えたため上記の方法で秘密鍵を読み込ませた。
他にも良い方法があれば是非ご教示頂きたい。

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

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?