Robert Wagner
Robert Wagner

Reputation: 11

Git refuses to push after restart

I created a repository today locally, on my USB, and then pushed it to Github. Before I restarted whenever I typed git push -u origin master it would ask for my credentials and then push my changes.

How would I set git to automatically enter them and just push it to the repo?

After I restarting, when I type git push -u origin master it returns an error

Permission denied (publickey).

fatal: Could not read from remote repository. Please make sure you have the correct access rights and the repository exists.

What is causing this error and how do I fix it?

Upvotes: 1

Views: 386

Answers (1)

Skam
Skam

Reputation: 7798

If you want to automatically enter your credentials you can setup SSH Keys which are a way of secure, automatic authentication.

If you correctly do that, it should fix your Permission denied (publickey) error.

Upvotes: 2

Related Questions