Permission denied (publickey) error on git run under AWS ubuntu server

I try to install nginx with git deployment as written here

But under Ubuntu under AWS.
During installation I created pem fiel and I connect to ubuintu system with ssh.

But pushing to the server with command

git push production master

I got error Permission denied (publickey).
    fatal: Could not read from remote repository.
    Please make sure you have the correct access rights
    and the repository exists.

Which step have I to take to make git working ?


Did you load the SSH key locally using ssh-add?

This topic was automatically closed 91 days after the last reply. New replies are no longer allowed.