user3813234
user3813234

Reputation: 1682

deploying app on openshift - git and ssh key not working

I'd like to deploy an app on OpenShift. I followed this tutorial:

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

Works fine until I want to push it. Then I get the following:

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.

I read in another post that I should copy the private keys from my user/.ssh folder (I'm on Windows 7) into git' ssh folder.

But in my git folder, there is no ssh folder, just a certs folder

What do I need to do exactly?

EDIT

I ran rhc setup and got this error:

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)

Which ssh configuration? On my computer? On OpenShift?

Upvotes: 1

Views: 1007

Answers (2)

Jiri Fiala
Jiri Fiala

Reputation: 1400

You may want to run rhc setup which will guide you through the process of setting up an ssh key (will generate one for you, if you'd like). Details can be found in Remote connection (SSH).

You can also use the OpenShift web interface to upload your ssh key, if you already have one that you plan to use.

Upvotes: 3

Josip Ivic
Josip Ivic

Reputation: 3709

A "Permission denied" error means that the server rejected your connection. You need the ssh key, because you don't have access rights.

You need to generate SSH key.

Upvotes: 1

Related Questions