Bug 1296994 - undesired ssh key generated automatically by rhc
undesired ssh key generated automatically by rhc
Status: CLOSED WONTFIX
Product: OpenShift Online
Classification: Red Hat
Component: Command Line Interface (Show other bugs)
2.x
Unspecified Unspecified
unspecified Severity low
: ---
: ---
Assigned To: Timothy Williams
Wei Sun
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2016-01-08 11:28 EST by Aleksandar Kostadinov
Modified: 2017-05-31 14:22 EDT (History)
3 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2017-05-31 14:22:11 EDT
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Aleksandar Kostadinov 2016-01-08 11:28:38 EST
Description of problem:
Some users don't want to have a default ssh key (they put keys in different locations) but rhc creates one without asking. `rhc setup` does that but also `rhc create app` and possibly other rhc commands. It asks if user wants the key to be uploaded but doesn't ask user if key should be generated at all. 

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

How reproducible:
always

Steps to Reproduce:
$ rhc create app ggg php-5.4

Actual results:
> $ rhc app create testapp php-5.4
> Application Options
> -------------------
> Domain:     dada
> Cartridges: php-5.4
> Gear Size:  default
> Scaling:    no
> 
> Creating application 'testapp' ... done
> 
> 
> No SSH keys were found. We will generate a pair of keys for you.
> 
>     Created: /home/crackit/.ssh/id_rsa.pub
> 
> Your public SSH key must be uploaded to the OpenShift server to access code.
> Upload now? (yes|no)
> no
> 
> You can upload your public SSH key at a later time using the 'rhc sshkey' command
> 
> Waiting for your DNS name to be available ... done
> 
> Cloning into 'testapp'...
> The authenticity of host 'testapp-dada.dev.rhcloud.com (54.173.70.116)' can't be established.
> RSA key fingerprint is SHA256:LMiKGk2SMt7yJf+ONi+Y6tV2DLpUaGE73YHOO3qVUkA.
> RSA key fingerprint is MD5:f9:70:40:4a:63:30:76:aa:11:93:30:13:52:e0:22:fe.
> Are you sure you want to continue connecting (yes/no)? no
> Host key verification failed.
> fatal: Could not read from remote repository.

> Please make sure you have the correct access rights
> and the repository exists.
> Unable to clone your repository. Called Git with: git clone
> ssh://568fd9bfd020cbdb21000005@testapp-dada.dev.rhcloud.com/~/git/testapp.git/
"testapp"
> 
> !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
> WARNING:  Your application was created successfully but had problems during
>           configuration. Below is a list of the issues and steps you can
>           take to complete the configuration of your application.
> 
>   Application URL: http://testapp-dada.dev.rhcloud.com/
> 
>   Issues:
>     1. We were unable to clone your application's git repo - Unable to clone your
> repository. Called Git with: git clone
> ssh://568fd9bfd020cbdb21000005@testapp-dada.dev.rhcloud.com/~/git/testapp.git/
"testapp"
> 
>   Steps to complete your configuration:
>     1. Clone your git repo
>       $ rhc git-clone testapp
> 
>   If you continue to experience problems after completing these steps,
>   you can try destroying and recreating the application:
> 
>     $ rhc app delete testapp --confirm
> 
>   Please contact us if you are unable to successfully create your
>   application:
> 
>     Support - https://www.openshift.com/support
> 
> !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
> 
> 
> 
> Your application 'testapp' is now available.
> 
>   URL:        http://testapp-dada.dev.rhcloud.com/
>   SSH to:     568fd9bfd020cbdb21000005@testapp-dada.dev.rhcloud.com
>   Git remote: ssh://568fd9bfd020cbdb21000005@testapp-dada.dev.rhcloud.com/~/git/testapp.git/
> 
> Run 'rhc show-app testapp' for more details about your app.


Expected results:
> ...
> You don't have a ssh key, do you want to generate and upload it to openshift?
> ...

If user selects "no" then key should not be generated. It would be useful to have a configuration option to skip generating ssh keys.

Additional info:
brought up originally here: http://stackoverflow.com/questions/34125191

Selecting low severity as use case is a little exotic and no data loss or anything serious comes from it as far as I can tell.
Comment 1 Eric Paris 2017-05-31 14:22:11 EDT
We apologize, however, we do not plan to address this report at this time. The majority of our active development is for the v3 version of OpenShift. If you would like for Red Hat to reconsider this decision, please reach out to your support representative. We are very sorry for any inconvenience this may cause.

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