Unable to open-shift git-clone application

I just opened an OpenShift account and went through this tutorial:

https://www.openshift.com/blogs/any-version-of-nodejs-you-want-in-the-cloud-openshift-does-it-paas-style

When I got to creating the application, I got the following error:

erelsgl@erelsgl-H61MLC :~/mynode$ sudo rhc create-app mynode nodejs-0.6 Application Options ------------------- Namespace: erel Cartridges: nodejs-0.6 Gear Size: default Scaling: no Creating application 'mynode' ... done Waiting for your DNS name to be available ... done Cloning into 'mynode'... Warning: Permanently added the RSA host key for IP address '23.22.156.99' to the list of known hosts. Permission denied (publickey,gssapi-keyex,gssapi-with-mic). fatal: The remote end hung up unexpectedly Unable to clone your repository. Called Git with: git clone ssh:// 522c....@mynode-erel.rhcloud.com /~/git/mynode.git/ "mynode" !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! 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://mynode-erel.rhcloud.com/ Issues: 1. We were unable to clone your application git repo - Unable to clone your repository. Called Git with: git clone ssh:// 522c...@mynode-erel.rhcloud.com /~/git/mynode.git/ "mynode" Steps to complete your configuration: 1. Clone your git repo $ rhc git-clone mynode If you continue to experience problems after completing these steps, you can try destroying and recreating the application: $ rhc app delete mynode --confirm Please contact us if you are unable to successfully create your application: Support - https://www.openshift.com/support !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! Your application 'mynode' is now available. URL: http://mynode-erel.rhcloud.com/ SSH to: 522c....@mynode-erel.rhcloud.com Git remote: ssh:// 522c....@mynode-erel.rhcloud.com /~/git/mynode.git/ Run 'rhc show-app mynode' for more details about your app. 

I tried to clone and got the following:

 erelsgl@erelsgl-H61MLC :~/mynode$ sudo rhc git-clone mynode Cloning into 'mynode'... Permission denied (publickey,gssapi-keyex,gssapi-with-mic). fatal: The remote end hung up unexpectedly Unable to clone your repository. Called Git with: git clone ssh:// 522c....@mynode-erel.rhcloud.com /~/git/mynode.git/ "mynode" 

EDIT: I have an ssh key:

 erelsgl@erelsgl-H61MLC :~/mynode$ sudo rhc sshkey list default (type: ssh-rsa) ----------------------- Fingerprint: 62:... You have 1 SSH keys associated with your account. 
+6
source share
7 answers

I have exactly the same problem and I found a solution under the windows. You seem to be under Linux, but maybe this will give you ideas.

First you need to make sure your SSL keys were created correctly for Git (check out this post on my blog for instructions).

Then, using Git for Windows, right-click on the folder to clone the project and enter the SSL URL:

enter image description here

Make sure you check Load Putty Key and select the path to your .ppk file. It worked like a charm for me.

Perhaps you need to specify the path to your Linux private key file when cloning from the command line.

+5
source

Your mistake is that you are cloning the repository inside the application host, this means cloning your repository inside your application host in openshift, then it gives you permission forbidden to write access to the host, you must close it in the local one.

First open a command prompt, then enter:

 mkdir apprepo cd /d apprepo git clone ssh:// 522c....@mynode-erel.rhcloud.com /~/git/mynode.git/ 

and if you have any changes to the repository:

 git commit -a git push 
+5
source

It looks like you have problems with your ssh key. Have you added it to minimize? You can run rhc sshkey list to check. Make sure that one of these private keys is in your ssh folder, C:\user\\[username]\\.ssh\ for windows and ~/.ssh in linux (note that they are hidden folders on both os). Openshift refuses to let you do anything using the git repository if it cannot confirm your ssh key. Take a look at the Openshift SSH Documentation for more details.

+3
source

go to eclipse setup and in ssh key menu, press "KEY MANAGEMENT" and ther is the "rsa key" tab, click and copy your public key and click "Save as private key" ... then go to the open shift application and insert your public key and work on it ... I hope it works

+1
source

Do not use sudo when creating an application or when using rhc

0
source

This seems to be the thread for answering SSH related issues, even if the response related to non-cloning on the host machine seems to make the most sense.

As for the configured keys, which are good for opening an SSH connection, but not for cloning git, I tried everything in this thread and on the OpenShift website and eventually found that git for Windows did not use managed by SSant keys by Pageant; the only way to clone my repository was to create a git GUI for me with a new key, and then add this public key to my OpenShift application.

I am posting this answer here because I don’t know where else I need it, I hope it will be useful!

0
source

I have the same problem as you and an idea based on the answer ʀɣαɳĵ

Do not use sudo when creating an application or when using rhc

Given this recommendation, I tried to uninstall my application and recreate it using my user without using sudo, but I got some permission errors indicating access problems:
- the .openshift folder under my user home folder

- .ssh / rsa * documents under my user home folder also
- My actual directory , where a new directory will be created as part of the creation of the application

After granting access to these resources using chmod:
- chmod 755 for both .openshift and .ssh / rsa *
- chmod -R 777 mydir in my actual directory

I created an application (rhc create app yourAppName application) and now everything works fine!

Hope this helps you.

0
source

Source: https://habr.com/ru/post/953433/


All Articles