LoginSignup
1
1

More than 3 years have passed since last update.

ssh内でgit cloneをした際のpermission deniedを解決する

Last updated at Posted at 2020-06-22

環境 

Mac OS Catalina バージョン 10.15.4

前提

ssh内でgit cloneをしようと

git clone git@github.com: 自分のリポジトリのURL

をターミナルで打つと

Warning: Permanently added 'github.com,13.114.40.48' (RSA) to the list of known hosts.
Permission denied (publickey).
fatal: Could not read from remote repository.

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

となり詰んでしまった......

解決法

SSHではなく、httpsでのクローンでうまくできた。
git hub内でのhttpsを押してURLをコピーする

スクリーンショット 2020-06-22 21.48.59.png

git clone https:// 自分のリポジトリのURL

無事完了!

Cloning into ...
remote: Enumerating objects: 150, done.
remote: Counting objects: 100% (150/150), done.
remote: Compressing objects: 100% (115/115), done.
remote: Total 150 (delta 17), reused 150 (delta 17), pack-reused 0
Receiving objects: 100% (150/150), 528.91 KiB | 829.00 KiB/s, done.
Resolving deltas: 100% (17/17), done.

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