403 forbidden permission denied (publickey) error etc when pushing files to Github fix.

Tried to push a project onto github and faced sooooooo much annoying errors.
1. Use ssh instead of https
ssh-keygen -t rsa -C "your_email@example.com"
2. Press enter all the way until the end.
3. Vi into your public key usually at ~/.ssh/id_rsa.pub
4. copy all text from public key and put it into your github account settings–ssh keys.
5. push using ssh you should be all set and you should not see any of the errors again.


Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s