I am on a windows machine trying to push code up to a remote git repository on an ec2 instance which runs ubuntu. I have setup the instance and created a bare repo at a location on the instance.
I have my public key on the instance cos i can ssh to it via putty and also via openssh software i installed.
i checked out
git push heroku master Permission denied (publickey)
Git - Permission denied (publickey)
but the suggested solutions were not clear to me
I can ssh into the instance using ssh -i mykey.pem ubuntu@1.1.1.1.
Problem is i have added the repo to my list of remotes but i keep getting the following error when i try to push from my local master to the remote repo using
production - ssh://ubuntu@ec2-1-1-1-1.compute-1.amazonaws.com
git push production master
Error
Permission denied (publickey).
fatal: Could not read from remote repository.
Please make sure you have the correct access rights
and the repository exists.