1
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.

初めてgit pullしようとしたら、何やらSSH keyを設定しろと言われた。

Last updated at Posted at 2020-12-28

Macを新調したついでに、ちょっとチーム開発気分を味わってみようかなと思い、古いMacでチョコチョコ上げていたリポジトリを、新しいMacでpullしてきて開発してみようと試みた。

ら、


$git pull origin master

The authenticity of host 'github.com (数字.数字.数字.数字)' can't be established.
RSA key fingerprint is SHA256:xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx.
Are you sure you want to continue connecting (yes/no/[fingerprint])? y
Please type 'yes', 'no' or the fingerprint: yes
Warning: Permanently added 'github.com,数字.数字.数字.数字' (RSA) to the list of known hosts.
git@github.com: Permission denied (publickey).
fatal: Could not read from remote repository.

Please make sure you have the correct access rights
and the repository exists.

と言われてしまった。

エラー文で検索すると、Qiita記事:GitエラーPermission denied (publickey).の解決方法が出てきたので、とりあえずSSH鍵を作る必要があると理解。

以下記事をコピペで、SSH keyを設定したら、無事にpullできるようになった。
Qiita記事:お前らのSSH Keysの作り方は間違っている

その後、git pushの度にSSH鍵入力を要求されるようになってしまったので、以下記事を実行したら解消した。
Git:Git BashにてSSH鍵のパスフレーズ入力を初回のみにする

1
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
1
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?