OpenShift Git Clone错误

4
我是一名OpenShift的新手,遇到了一些问题。
当我执行以下操作时:
rhc app git-clone mynewapp


Your public ssh key must be uploaded to the OpenShift server.  Would you like us to upload it for you? (yes/no) yes

You can enter a name for your key, or leave it blank to use the default name. Using the same name as an existing key will overwrite
the old key.

Since you do not have any keys associated with your OpenShift account,
your new key will be uploaded as the 'default' key

type: ssh-rsa
content:
AAAAB3NzaC1yc2EAAAADAQABAAABAQCuA9kdmq5Pf5JLyHeMpWQ+XYaEzw8UWziUfXohMR8Dt9ZwkIb4WSHLzcGKKpclZvWOi2UZMQCOp8wCij5VS/ps8/3YPQVYyg+GHAAZIr
WsGDnJdpRF/shUnvoPx6XTzzLFHxBOS92LktjvX/T+xqftS6aVugD0cQ0vVkA6e5FwIjwo4JHoJGRFzgdaSbC5nDiHvDX7zhtnQXe1TeTK5nhjDj/uZPaj5h0hRv4Zx0EzfDYu
Uig0GCoFrWsJ9MTw5F7WEeOtPNtp2uFubuDCDpoBtBBDDmL642AY8r9IV4REGSfUDzV+M0Ab33ubRYKmp+ok6MtBrlTKg94PaVvuf2V5
fingerprint: eb:41:87:1b:e8:4e:ec:c0:8d:c8:c6:5e:a2:6a:ad:b4
Uploading key 'default' from /home/toriq/.ssh/id_rsa.pub
Cloning into 'myapp'...
done

突然出现了一个错误:
Error in git clone - Agent admitted failure to sign using the key.
Permission denied (publickey,gssapi-keyex,gssapi-with-mic).
fatal: The remote end hung up unexpectedly

有没有解决方法?
2个回答

4

这可能类似于GitHub帮助页面

对于大多数用户,只需要运行ssh-add将您的密钥加载到SSH代理中即可解决此问题。

$ ssh-add
# Enter passphrase for /home/you/.ssh/id_rsa: [tippy tap]
# Identity added: /home/you/.ssh/id_rsa (/home/you/.ssh/id_rsa)

如果您的密钥文件名不是默认值,您需要将路径传递给ssh-add:
$ ssh-add ~/.ssh/my_other_key
# Enter passphrase for /home/you/.ssh/my_other_key: [tappity tap tap]
# Identity added: /home/you/.ssh/my_other_key (/home/you/.ssh/my_other_key)

好的,感谢解决方案, 但是当我执行ssh-add命令时,出现了id_rsa权限被拒绝的问题。 - Toriq Pria Dhigfora
@ToriqPriaDhigfora,你是否拥有自己的~/.ssh目录?请记住,它必须正确设置某些权限:https://dev59.com/w1XTa4cB1Zd3GeqP361B#5471139,并且你的`.ssh`的任何父目录都不能对组或全局用户可写(例如755,而不是775)。 - VonC

2

网页内容由stack overflow 提供, 点击上面的
可以查看英文原文,
原文链接