I cloned a Git repository from my GitHub account to my PC.
I want to work with both my PC and laptop, but with one GitHub account.
When I try to push to or p
As many users has said, you just have to change your Git repository URL from HTTPS to SSH.
If you haven't generated a SSH key in your machine, then your are going to have to do it.
Just as an additional information, after doing this change I still was getting the same error:
Permission Denied.
In my case, the problem was that I was using the Windows Shell to execute the ngh command; since this command should open a prompt to request the SSH phrase and the Windows Shell doesn't open these kinds of prompts, the authentication just failed.
So, I just had to open the Git shell and execute the ngh command there, put the SSH phrase in the prompt every time it asked for it and "voilà"... It just worked fine!