我正在尝试克隆一个可湿性粉剂网站,我已经建立了一个仓库。
我正在使用BitBucket,并且我能够设置我的公钥和私钥对,这没有问题。然后,我在我的GitBash终端(我在Windows上)通过SSH登录到我的实时服务器帐户。当我尝试将我的repo克隆到网站的live文件夹中时,我得到的是这样的结果。
[Server-Name]$ cd domains-folder.com/
[Server-Name]$ git clone --recursive git@bitbucket.org:User/foldername.git
Cloning into 'domain-folder'...
Permission denied (publickey).
fatal: The remote end hung up unexpectedly
[Server-Name]$ ssh-add -l
Could not open a connection to your authentication agent.
[Server-Name]$ exit
logout
Connection to Server-Name.Server.com closed.
User@Computer ~/.ssh
$我是不是漏掉了一步?我很困惑,因为当我登录到我的服务器时,我通过SSH连接到了它,所以我不应该有访问权限吗?请让我知道我能做什么,如果你需要更多的信息,我很乐意提供。
发布于 2015-04-30 20:30:59
据我所知,该错误消息可能有多种原因,通常是因为git无法连接到用户。
检查以下内容:您是否正在使用设置了ssh密钥的用户?您是否连接到正确的url?检查您的密钥是否已加载:
ssh-add -l这里有一个很棒的疑难解答页面,应该会对你有所帮助:https://confluence.atlassian.com/display/BITBUCKET/Troubleshoot+SSH+Issues#TroubleshootSSHIssues-Permissiondenied(publickey)orNosuitableresponsefromremote
发布于 2015-04-30 20:31:10
不完全清楚您在做什么,但是如果您希望从Windows访问"live server“时加载的ssh密钥也可以在"live server”上使用,以便通过bitbucket进行身份验证,那么您需要在"gitbash“客户端中启用密钥转发
对于ssh程序,这是打开“转发身份验证代理连接”的-A选项。
https://stackoverflow.com/questions/29967707
复制相似问题