LoginSignup
0
0

More than 3 years have passed since last update.

githubでcloneできなかったときの解決法

Posted at

cloneしようとしたら

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.

と出たので下記コマンドで設定ファイルを編集して

vim ~/.ssh/config

Host のあとにgitbubだけじゃなくて、github.comと書いたら解決した

Host github github.com
 HostName github.com
 User git
 IdentityFile ~/.ssh/id_rsa_github

(参考)標準出力をクリップボードにコピーするにはpbcopyを使う

cat ~/.ssh/config | pbcopy
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