I use Git for Windows. I created SSH key and added it into the keys list of my GitHub settings according this article. Now I try to use it, but I get the error:
$ git push origin master
Username for 'https://github.com': Andrey-Bushman
Password for 'https://[email protected]':
remote: Invalid username or password.
fatal: Authentication failed for 'https://github.com/Andrey-Bushman/sandbox.git/
How can I fix it?
First make sure, ssh keys are successfully created by executing the command:
$ ssh -T [email protected]
It should print
"Hi Andrey-Bushman! You've successfully authenticated, but GitHub does notprovide shell access."
If not, then refer to SSH Access to Git.
Once done follow the steps below:
clone the repo using ssh protocol as:
[email protected]:<github-username>/<repo>.git
In your case:
[email protected]:Andrey-Bushman/<repo>.git
Commit your changes to the repo.
Then, git push origin <branch-name>
In your case:
git push origin master
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With