Bug 1044930 - Error message is mess when adding invalid sshkey file without using --confirm option.
Summary: Error message is mess when adding invalid sshkey file without using --confirm...
Keywords:
Status: CLOSED WONTFIX
Alias: None
Product: OpenShift Online
Classification: Red Hat
Component: oc
Version: 2.x
Hardware: Unspecified
OS: Unspecified
low
low
Target Milestone: ---
: ---
Assignee: Jordan Liggitt
QA Contact: libra bugs
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2013-12-19 09:13 UTC by Yujie Zhang
Modified: 2015-06-11 21:54 UTC (History)
3 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2015-06-11 21:54:38 UTC
Target Upstream Version:


Attachments (Terms of Use)

Description Yujie Zhang 2013-12-19 09:13:05 UTC
Description of problem:

Tried to add sshkey file with empty content, got the following result:
[root@dhcp-8-252 home]# rhc sshkey add dddd ~/.ssh/empty.pub
File '/root/.ssh/empty.pub' does not appear to be a recognizable key file (public key at  is not
valid). You may specify the '--confirm' flag to add the key anyway.

**There should be a key path after the "(public key at".

Tried to add sshkey file with "ssh-rsa aasd" content:
[root@dhcp-8-252 home]# rhc sshkey add dddd ~/.ssh/empty.pub
File '/root/.ssh/empty.pub' does not appear to be a recognizable key file (not a public key ""). You
may specify the '--confirm' flag to add the key anyway.

**There should be key content in the "".

Tried to add sshkey file with "ssh-rsa LLLLLLLLLLLLLLOKJOIGUSOPIDFUSDFLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLSKJFOSKDFJSIDFLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLSLKDFLKSJDLKSLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLL
" content:

[root@dhcp-8-252 home]# rhc sshkey add dddd ~/.ssh/empty.pub
File '/root/.ssh/empty.pub' does not appear to be a recognizable key file (unsupported key type
`��,��,��$�Q#1TH1K,��,��,��,��,��,��,��-"���
                                              RR 1K,��,��,��,��,��,��,��,��,��,��,��,��,��
��,��,��,��,��,��,��,��,��,��,��,��,��,��,��'). You may specify the '--confirm' flag to add the key
anyway.

The message is really mess.

Version-Release number of selected component (if applicable):
devenv_4156
rhc-1.19.2

How reproducible:
always

Steps to Reproduce:
1.Create an empty.pub with empty content
2.Run command 'rhc sshkey add dddd ~/.ssh/empty.pub'
3.Edit the empty.pub with "ssh-rsa aasd" content
4.Run command 'rhc sshkey add dddd ~/.ssh/empty.pub'
5.Edit the empty.pub with "ssh-rsa LLLLLLLLLLLLLLOKJOIGUSOPIDFUSDFLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLSKJFOSKDFJSIDFLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLSLKDFLKSJDLKSLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLL
" content
6.Run command 'rhc sshkey add dddd ~/.ssh/empty.pub'


Actual results:

2.[root@dhcp-8-252 home]# rhc sshkey add dddd ~/.ssh/empty.pub
File '/root/.ssh/empty.pub' does not appear to be a recognizable key file (public key at  is not
valid). You may specify the '--confirm' flag to add the key anyway.
4.[root@dhcp-8-252 home]# rhc sshkey add dddd ~/.ssh/empty.pub
File '/root/.ssh/empty.pub' does not appear to be a recognizable key file (not a public key ""). You
may specify the '--confirm' flag to add the key anyway.
6.
[root@dhcp-8-252 home]# rhc sshkey add dddd ~/.ssh/empty.pub
File '/root/.ssh/empty.pub' does not appear to be a recognizable key file (unsupported key type
`��,��,��$�Q#1TH1K,��,��,��,��,��,��,��-"���
                                              RR 1K,��,��,��,��,��,��,��,��,��,��,��,��,��
��,��,��,��,��,��,��,��,��,��,��,��,��,��,��'). You may specify the '--confirm' flag to add the key
anyway.

Expected results:

The warning message should be in correct format and should not miss content.

Additional info:


Note You need to log in before you can comment on or make changes to this bug.