Bugzilla will be upgraded to version 5.0. The upgrade date is tentatively scheduled for 2 December 2018, pending final testing and feedback.
Bug 1154344 - "rhc app create" cannot use from-code option with SSH protocol like "--from-code=git@example.com:openshift/xxx.git"
"rhc app create" cannot use from-code option with SSH protocol like "--from-c...
Status: CLOSED ERRATA
Product: OpenShift Container Platform
Classification: Red Hat
Component: Command Line Interface (Show other bugs)
2.1.0
All All
urgent Severity high
: ---
: ---
Assigned To: John W. Lamb
libra bugs
: Upstream
Depends On: 1163964
Blocks:
  Show dependency treegraph
 
Reported: 2014-10-18 23:07 EDT by Kenjiro Nakayama
Modified: 2015-01-08 10:34 EST (History)
9 users (show)

See Also:
Fixed In Version: rubygem-openshift-origin-node-1.33.1.1-1
Doc Type: Known Issue
Doc Text:
Cause: A node's root user must have SSH keys in place in order to clone an application from a GIT repo over SSH. It's not common for users who are deploying applications to have the ability to deploy SSH keys to the root user. Consequence: Cloning applications over SSH is not supported. Workaround (if any): None. Result: An appropriate error message is now provided indicating the user should clone over a non SSH protocol.
Story Points: ---
Clone Of:
: 1163964 (view as bug list)
Environment:
Last Closed: 2015-01-08 10:34:16 EST
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)


External Trackers
Tracker ID Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2015:0019 normal SHIPPED_LIVE Red Hat OpenShift Enterprise 2.2.3 bug fix and enhancement update 2015-01-08 15:33:24 EST

  None (edit)
Description Kenjiro Nakayama 2014-10-18 23:07:30 EDT
Description of problem:
===
When I try to use --from-code option with ssh protocol, I get forllowing error.

  knakayam@localhost:~$ rhc app create kitchensink jbossas-7 mysql-5.5 -g small --from-code=git@github.com:openshift/kitchensink-example.git
  Application Options
  -------------------
  Domain:      kenjiro
  Cartridges:  jbossas-7, mysql-5.5
  Source Code: git@github.com:openshift/kitchensink-example.git
  Gear Size:   small
  Scaling:     no
   
  Creating application 'kitchensink' ... 
  Source code repository could not be cloned:
  'git@github.com:openshift/kitchensink-example.git'. Please verify the repository
  is correct and try a non-SSH URL such as HTTP.


Version-Release number of selected component (if applicable):
===
Tested for OSE2.1.4 and OpenShift Online with ..
  [root@vm ~]# rhc --version
  rhc 1.24.3.1
  knakayam@localhost:~$ rhc --version
  rhc 1.19.5


How reproducible:
===

Steps to Reproduce:
1. Test below with OpenShift Online
  $ rhc app create kitchensink jbossas-7 mysql-5.5 -g small --from-code=git@github.com:openshift/kitchensink-example.git

2. I have already uploaded SSH pubkey on github, I can git clone.
  $ git clone git@github.com:openshift/kitchensink-example.git

3. Also we can create with git protocol like below.
  $ rhc app create kitchensink jbossas-7 --from-code git://github.com/openshift/kitchensink-example.git

Actual results:
(Please seee ${Description of problem})

Expected results:
We need to spcify SSH protocol for --from-code. We cannot use other protocols except SSH on some environment.
Comment 3 Jhon Honce 2014-10-21 11:01:06 EDT
git SSH protocol is supported by the from-code, see below. When this has come up in the past it is some networking device/firewall blocking outbound SSH connections.

The error message includes the hint to use http/s as those alternative protocols may be open.


$rhc app create kitchensink jbossas-7 mysql-5.5 -g small --from-code=git@github.com:openshift/kitchensink-example.git
Application Options
-------------------
Domain:      honcenet
Cartridges:  jbossas-7, mysql-5.5
Source Code: git@github.com:openshift/kitchensink-example.git
Gear Size:   small
Scaling:     no

Creating application 'kitchensink' ... Artifact: ./ROOT.war is still deploying
done

  MySQL 5.5 database added.  Please make note of these credentials:

       Root User: admini4bU98q
   Root Password: PxX7ztf-FKAw
   Database Name: kitchensink

Connection URL: mysql://$OPENSHIFT_MYSQL_DB_HOST:$OPENSHIFT_MYSQL_DB_PORT/

You can manage your new MySQL database by also embedding phpmyadmin.
The phpmyadmin username and password will be the same as the MySQL credentials above.

Waiting for your DNS name to be available ... done

Cloning into 'kitchensink'...
Warning: Permanently added 'kitchensink-honcenet.dev.rhcloud.com,10.142.185.137' (RSA) to the list of known hosts.

Your application 'kitchensink' is now available.

  URL:        http://kitchensink-honcenet.dev.rhcloud.com/
  SSH to:     5446ac2a3166c817a0000001@kitchensink-honcenet.dev.rhcloud.com
  Git remote: ssh://5446ac2a3166c817a0000001@kitchensink-honcenet.dev.rhcloud.com/~/git/kitchensink.git/
  Cloned to:  /root/kitchensink

Run 'rhc show-app kitchensink' for more details about your app.
Comment 4 Kenjiro Nakayama 2014-10-21 22:37:27 EDT
I tested on my several different environment, but --from-code with SSH protocol is always failed.

I am sure I can git clone with SSH protocol like this.

  $ git clone git@github.com:openshift/kitchensink-example.git
  Cloning into 'kitchensink-example'...
  remote: Counting objects: 140, done.
  remote: Total 140 (delta 0), reused 0 (delta 0)
  Receiving objects: 100% (140/140), 87.17 KiB | 66.00 KiB/s, done.
  Resolving deltas: 100% (29/29), done.
  Checking connectivity... done.

Also I tested for my OSE environment and could see "Host key verification failed." error in /var/log/openshift/node/platform-trace.log.

So, although I think my comment#1 is not wrong, I will wait for QA.

Thanks for your comment, Jhon.
Comment 16 Anping Li 2014-12-09 01:15:25 EST
Verified and pass on puddle-2-2-2014-12-08

Currently, rhc provide meanfull message when use from-code option with SSH protocol 

[anli@dhcp-129-213 ~]$ rhc app create python2 python-2.6 --from-code=git@github.com:openshift/flask-example.git
Application Options
-------------------
Domain:      hanli1dom
Cartridges:  python-2.6
Source Code: git@github.com:openshift/flask-example.git
Gear Size:   default
Scaling:     no

Creating application 'python2' ... 
Source code repository could not be cloned:
'git@github.com:openshift/flask-example.git'. Git clone using SSH requires the
OpenShift server to authenticate to the repository. Please verify the repository
is correct, and try a non-SSH URL such as HTTPS.
Comment 18 errata-xmlrpc 2015-01-08 10:34:16 EST
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://rhn.redhat.com/errata/RHBA-2015-0019.html

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