On my EC2 instance I create a rails project (my_app) and then a repository of it :
deploy@ip-ec2: ~/my_app$ git init
(then git add-A, then git commit -m "initialized", and everything is ok)
also in this server add the public key of my local machine: id_rsa.pub, to the file authorized_keys in server side.
Now in local machine, I want to clone the created repository that is in the ec2:
local@machine:~/repos$ sudo git clone ssh://[email protected]/~/my_app
output in local machine:
Clonar en «my_app»...
Permission denied (publickey).
fatal: Could not read from remote repository.
Please make sure you have the correct access rights
and the repository exists.
What I am missing? Should I have to change some permission in server project?