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,456 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,380 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,406 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
6,886 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,380 points
425 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,380 points
2,007 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
2,081 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,380 points
9,128 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,380 points
228 views
webinar REGISTER FOR FREE WEBINAR X
REGISTER NOW
webinar_success Thank you for registering Join Edureka Meetup community for 100+ Free Webinars each month JOIN MEETUP GROUP