How to solve Permission denied publickey error when using Git

0 votes

Hi Guys,

I'm using a Mac System. I just installed git and tried to clone one repository.

$ git clone git@xxxxxxxxxxxxx.git

But it is showing me the below error.

Initialized empty Git repository in `/Users/username/Documents/cakebook/.git/`
Permission denied (publickey).
fatal: The remote end hung up unexpectedly
Jan 4, 2021 in Git & GitHub by akhtar
• 38,240 points
1,034 views

1 answer to this question.

0 votes

Hi@akhtar,

If the user has not generated an ssh public/private key pair set before then this kind of error occurs.  You need to create an SSH key pair and set the key in GitHub. It will solve your error.

answered Jan 4, 2021 by MD
• 95,340 points

Related Questions In Git & GitHub

0 votes
1 answer

How to solve the ‘Git commit -a error’?

This happens when no editor is set. ...READ MORE

answered Jul 5, 2018 in Git & GitHub by Tyrion anex
• 8,690 points
1,182 views
0 votes
1 answer

How do I solve a Git checkout error: updating paths is incompatible with switching branches?

This error occurs when you are checking ...READ MORE

answered Jul 26, 2018 in Git & GitHub by Sophie may
• 10,590 points
5,582 views
0 votes
1 answer

GitHub Error Message - Permission denied (publickey).

Hi@akhtar, I think GitHub isn't able to authenticate ...READ MORE

answered Jan 4, 2021 in Git & GitHub by MD
• 95,340 points
306 views
0 votes
1 answer

How to ignore an error on 'git pull' about my local changes would be overwritten by merge?

Hi Team, If you want to remove all ...READ MORE

answered Jan 5, 2021 in Git & GitHub by MD
• 95,340 points
1,653 views
+15 votes
2 answers

Git management technique when there are multiple customers and need multiple customization?

Consider this - In 'extended' Git-Flow, (Git-Multi-Flow, ...READ MORE

answered Mar 27, 2018 in DevOps & Agile by DragonLord999
• 8,450 points
1,583 views
+2 votes
1 answer
0 votes
1 answer

How to untrack and remove a deleted file and log when we check git status ?

Hi@Shashi, You can use the git clean command. ...READ MORE

answered Oct 29, 2020 in Git & GitHub by MD
• 95,340 points
5,135 views
+1 vote
1 answer

How to view the change history of a file using Git versioning?

Hi@akhtar, You can use gitk for this task. ...READ MORE

answered Dec 22, 2020 in Git & GitHub by MD
• 95,340 points
144 views
webinar REGISTER FOR FREE WEBINAR X
Send OTP
REGISTER NOW
webinar_success Thank you for registering Join Edureka Meetup community for 100+ Free Webinars each month JOIN MEETUP GROUP