我尝试在自己的Ubuntu服务器(SFTP)中创建远程存储库。我按照以下链接安装并配置Git:http://git-scm.com/book/en/Git-on-the-Server-Setting-Up-the-Server。然后尝试将我的代码从本地计算机推送到服务器,它会出现以下错误。
$ git push origin master
Permission denied (publickey).
fatal: Could not read from remote repository.
Please make sure you have the correct access rights
and the repository exists."
公钥可在本地.ssh
目录以及服务器authorized_keys
文件中使用
你会如何解决这个问题?