2016-06-17 58 views
0

我试图用“ssh -A root @ myhost”通过代理转发连接远程服务器;ssh代理转发不起作用

虽然我成功地连接到我的远程服务器,但是当我从GitHub拉 代码,它给我的错误:

Permission denied (publickey). 
fatal: Could not read from remote repository. 

Please make sure you have the correct access rights 
and the repository exists. 

那么如何解决这个问题?我可以用我自己的电脑拉代码;我相信我有权拉代码

+0

你有'ssh-agent'中的密钥吗? 'ssh-add -L'在主机和'myhost'上返回什么? – Jakuje

回答

0

Githib没有验证你,因为你没有正确设置或者密钥与Githib不匹配。

您可以按照此https://help.github.com/articles/generating-an-ssh-key/和这个或https://help.github.com/articles/error-permission-denied-publickey/

您可以使用HTTPS URL而不是SSH/git来避免SSH错误。 https://help.github.com/articles/set-up-git/

+0

我想我已经添加了我自己的pc ssh密钥给github回购。 – junk

+0

更好的建议是使用HTTPS https://help.github.com/articles/set-up-git/ –

+0

我已经成功地设置了git;我只想在远程服务器上使用我自己的电脑的权限 – junk