2015-10-20 64 views
1

我想在OpenShift上部署應用程序。直到我希望將它在openshift上部署應用程序 - git和ssh鍵不起作用

https://developers.openshift.com/en/wildfly-getting-started.html#step1

正常工作:我跟着這個教程。然後,我得到如下:

Warning: Permanently added 'xxxx.rhcloud.com,54.88.2.59' (RSA) to the list of known hosts. 
Permission denied (publickey,gssapi-keyex,gssapi-with-mic). 
fatal: Could not read from remote repository. 

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

我在另一篇文章,我應該從我的用戶/的.ssh文件夾中複製私有密鑰讀取(我在Windows 7中)到混帳」的ssh文件夾。

但在我的git的文件夾,裏面是沒有的ssh文件夾,只是一個證書文件夾

什麼我需要做的是什麼呢?

編輯

我跑RHC設置和得到這個錯誤:

Your private SSH key file should be set as readable only to yourself. Please 
run 'chmod 600 C:\Users\xxx\.ssh\id_rsa' 

An SSH connection could not be established to jenkins-xxx.rhcloud.com. 
Your SSH configuration may not be correct, or the application may not be 
responding. Could not parse PKey: no start line (ArgumentError) 

哪個SSH配置?在我的電腦上?在OpenShift上?

+0

在您的計算機上。嘗試'chmod 600' –

回答

1

「權限被拒絕」錯誤表示服務器拒絕您的連接。你需要ssh密鑰,因爲你沒有訪問權限。

您需要生成SSH密鑰。

3

您可能想要運行rhc setup,它將引導您完成設置ssh密鑰的過程(如果您願意,將爲您生成一個密鑰)。詳細信息可在Remote connection (SSH)中找到。

如果您已經有一個計劃使用的密鑰,您也可以使用OpenShift Web界面上傳您的ssh密鑰。

+0

感謝您的答覆,我編輯了我的問題。 – user3813234

+0

@ user3813234,如果您不介意,您可以刪除您的id_rsa並重新運行rhc設置,生成並上傳新的密鑰對。 –

+0

我做到了。我刪除了id_rsa和id_rsa.pub,reran rhc安裝程序並在id_isa上執行了chmod 600 ...當我執行git push時出現同樣的訪問權限錯誤。順便說一句,rhc ssh access的作品。也許我在用git做錯了什麼?但我只是按照他們的教程... – user3813234

相關問題