How can I push my repository to Github using SSH?
Why
I want to host my repository on GitHub during my PHP study.
What I did
I set remote url of kaede0902/php
to htdocs/workspace
,
and tried to pull. I used sudo.
Error Message
kaede@kaede-ThinkPad-T450:/opt/lampp/htdocs/workspace$ sudo git pull origin master
Warning: Permanently added the RSA host key for IP address '52.69.186.44' to the list of known hosts.
git@github.com: Permission denied (publickey).
fatal: Could not read from remote repository.
Please make sure you have the correct access rights
and the repository exists.
My ssh url is git@github.com:kaede0902/php.git
.
I am using ssh connection for other repos.
What is the problem?