2012-11-18 65 views
4

我在OpenShift是一個新手,我有它的問題,OpenShift的Git克隆錯誤

當我做

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 

所有解決方案這個 ?

回答

4

這可能與此類似GitHub help page

對於大多數用戶來說,只需運行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) 
+0

好,爲解決方案, 但是當我做的ssh-加感謝,有一個權限被拒絕的問題TI id_rsa。 –

+0

@ToriqPriaDhigfora你擁有你的〜/ .ssh目錄嗎?請記住,它必須具有正確的設置:http://stackoverflow.com/a/5471139/6309,並且'.ssh'的父目錄都不能寫入組或世界(例如755),而不是775)。 – VonC

+0

ssh-add爲我工作 –