Qiita Teams that are logged in
You are not logged in to any team

Log in to Qiita Team
Community
OrganizationAdvent CalendarQiitadon (β)
Service
Qiita JobsQiita ZineQiita Blog
Help us understand the problem. What is going on with this article?

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

環境 

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.

Why not register and get more from Qiita?
  1. We will deliver articles that match you
    By following users and tags, you can catch up information on technical fields that you are interested in as a whole
  2. you can read useful information later efficiently
    By "stocking" the articles you like, you can search right away