When I want to push to github with this command
git push origin master
I got this
Permission denied (publickey).
fatal: The remote end hung up unexpectedly
So, what's wrong?
When I want to push to github with this command
git push origin master
I got this
Permission denied (publickey).
fatal: The remote end hung up unexpectedly
So, what's wrong?
Have you generated an SSH key for yourself and added it to your Github account? They have a guide for this here.
This is a very common problem and all beginners face this issue. Here is how to resolve the problem.
Open gitbash
Update your email address in below command.
ssh-keygen -t ed25519 -C "your_email@example.com"
Then copy your ssh key to clipboard with below command.
clip < ~/.ssh/id_ed25519.pub
Open your git account from the browser. goto settings -> ssh and gpg keys -> click on "New ssh key" add name and key in the text box then press save and git will ask you to enter your account password please enter that and your ssh key will be configured.
That's it it should resolve your problem if not then please do let me know. I'll help you troubleshoot the issue.
Peace.