Unable to login to Openshift

2019-03-19 06:41发布

I have been trying to connect to my application via Openshift for days and still have no luck.

I am no certain of which forum to go at this point because I am not getting help anywhere.

1) I am going via terminal and running sudo rhc setup (the reason why I am using sudo is because without it, it did not go to the next step)

2) I am then prompted to do the following:

This wizard will help you upload your SSH keys, set your application namespace, and check
that other programs like Git are properly installed.

Using an existing token for myemail@gmail.com to login to openshift.redhat.com

Saving configuration to /Users/myuser/.openshift/express.conf ... done

Checking for git ... found git version 1.9.2

Checking common problems .Enter passphrase for /Users/myuser/.ssh/id_rsa: 
Enter passphrase for /Users/myuser/.ssh/id_rsa: 
Enter passphrase for /Users/myuser/.ssh/id_rsa: 

3) I created this SSH key twice and it will never accept my password giving me the following error:

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

4) Yet confusingly it gives me the following result

Checking for a domain ... mydomain

Checking for applications ... found 1

ghost http://ghost-mydomain.rhcloud.com/

You are using 1 of 3 total gears
The following gear sizes are available to you: small

Your client tools are now configured.

5) I then use the access command given on my application page:

ssh 5394cd33e0b8cde6ce000132@ghost-mydomain.rhcloud.com

It prompts me to type in my password and no matter how many times I enter it, it fails: Saving password to keychain failed

What am I doing wrong? How can I simply login to openShift and use my application?

9条回答
戒情不戒烟
2楼-- · 2019-03-19 07:23

The only way that this worked for me was to actually create a SSH key locally with ssh-keygen -p without rhc setup and "not" giving it a password. I then went back to OpenShift clicked add a key and pasted the contents of my rsa file.

There is obviously some kind of bug with authentication on Openshift or the installation is not right.

查看更多
爷的心禁止访问
3楼-- · 2019-03-19 07:24
rhc ssh yourapplicationname

instead.

查看更多
倾城 Initia
4楼-- · 2019-03-19 07:29

When your got

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

just delete ssh keys id_rsa from .ssh directory and than run rhc setup it will create new one for you with the same name.

查看更多
小情绪 Triste *
5楼-- · 2019-03-19 07:31

I can solve removing /Users/myuser/.ssh/id_rsa directory and running rhc setup

查看更多
Animai°情兽
6楼-- · 2019-03-19 07:33

It is asking for the password that you created for you SSH Private Key file, not your openshift password. Either make sure that you are entering that password, or create a private key file that does NOT use a password.

查看更多
【Aperson】
7楼-- · 2019-03-19 07:44

I suspect one of two things is going on.

  1. The key you are trying to use from /Users/myuser/.ssh/id_rsa may be an ssh V2 key. If you created this on a Mac, it can be configured to create either V1 or V2 by default. OpenShift isn't AFAIK configured to support V2 keys. I would expect ssh-keygen -t rsa to create V1 keys.

  2. Your use of sudo rhc is confusing things. Commands run by sudo run as root, while commands without it run as your user. Above rhc setup appeared to still be accessing your user's ssh key, so I am not certain it's related, but there should be no need for root access. Your comments elsewhere indicate rvm is in use. Try rvm use system so that you can run rhc setup as your user against the system gems (which is most likely where the rhc gem is installed).

查看更多
登录 后发表回答