Permission denied (publickey,gssapi-keyex,gssapi-with-mic) on openshift

what worked for me was to generate the keys using Git Bash

ssh-keygen -t rsa -b 4096 -C "[email protected]"

and then add the key to ssh-agent as described here

https://help.github.com/articles/generating-a-new-ssh-key/


if you are using Windows, you can try the following steps:

  1. look for your ssh public key usually you can find it at c:\\users\\YOUR_USERNAME\\.ssh

  2. copy your openshift public key to your git's ssh-key folder

    suppose we have git in d:\\git

    then we need to copy the public key from c:\\users\\YOUR_USERNAME\\.ssh to d:\\git\\.ssh

  3. try if it works


Remove the keys: rhc sshkey-remove You can also delete them from the management console, by going to https://openshift.redhat.com/app/console/settings

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

Save it. After this try to git clone and it should work for you.


Had the same issue and wasted hours, I'm using centos 7. The following solved my problem.

On linux:

  1. "cd /home/your_username/.ssh"
  2. View "id_rsa.pub" and copy contents
  3. On openshift create a key from the UI and paste the contents from your "*.pub" file
  4. Save your new key
  5. Try reconnecting from your local machine

Hope the above helps. Note, on mac it worked from the word go only linux game me errors.