1

I am not able to add a host to the list of known hosts on OpenShift.com. I get the following error message:

...
Cloning into 'persiandm'...
The authenticity of host 'github.com (192.30.252.129)' can't be established.
RSA key fingerprint is 16:27:ac:a5:76:28:2d:36:63:1b:56:4d:eb:df:a6:48.
Are you sure you want to continue connecting (yes/no)? yes
Failed to add the host to the list of known hosts (/var/lib/openshift/$USER/.ssh/known_hosts).
Permission denied (publickey).
fatal: Could not read from remote repository.

Please make sure you have the correct access rights
and the repository exists.
akfoss
  • 15
  • 4

2 Answers2

0

This question is also being answered here

Openshift plone quickstart permission denied

If it doesn't work, please try below

Remove the keys: rhc sshkey-removes

Once done, upload the public key (copy the content of your id_rsa.pub to management console)

Save it.

Using Console

You can also delete them from the management console, by going to https://openshift.redhat.com/app/console/setting

Once done, upload the public key (copy the content of your id_rsa.pub to management console) : https://openshift.redhat.com/app/console/keys/new

Community
  • 1
  • 1
ganeshragav
  • 8,695
  • 1
  • 16
  • 13
  • My error message is slightly different from the one you mentioned. my error message: `Failed to add the host ...` and the one you mentioned: `Warning: Permanently added ...` – akfoss Dec 10 '14 at 06:20
  • Yes, whatever mentioned is right. either existing key is corrupted, in this case, you have to regenerate. Else command you execute might be on wrong machine, One similar issue is found here https://forums.openshift.com/authentication-failure-while-copying-content-from-local-sever-to-openshift-server – ganeshragav Dec 10 '14 at 09:42
  • It's a different problem. One thing is the missing permission to modify known hosts, another the corrupted or missing keys. – ptrk May 06 '16 at 13:42
  • I think that answer is actually closer: http://stackoverflow.com/q/27714857/1147684 – ptrk May 06 '16 at 13:47
0

As far as I learned a non-super-user cannot modify the known-hosts in an Openshift instance. I got away using a custom folder, but I guess not all technologies would allow it. The RedHat support engineers told me that cross-gear SSH communication is not recommended and should not work(!). Fortunately it does, at least sometimes.

ptrk
  • 1,800
  • 1
  • 15
  • 24