Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remote build context in compose file fails when using a git repo rather than a direct link to a Dockerfile #2684

Closed
ghost opened this issue Oct 3, 2016 · 12 comments
Assignees
Labels
kind/bug Outline of a bug - must adhere to the bug report template.
Milestone

Comments

@ghost
Copy link

ghost commented Oct 3, 2016

  1. Create a workspace with the following recipe:
services:
 dev-machine:
  build:
   context: https://github.com/eclipse/che.git

This recipe works locally while Che says:

Unable to start workspace agent. Error when trying to start the workspace agent: Start of environment wksp-aekgddsdffews failed. Error: Error response from docker API, status: 500, message: Error response from daemon: Error trying to use git: exec: "git": executable file not found in $PATH ()

@ghost ghost added the kind/bug Outline of a bug - must adhere to the bug report template. label Oct 3, 2016
@garagatyi
Copy link

When git is installed in the system it works. So git is mandatory for support of this feature.

@TylerJewell
Copy link

I think we leave this as a bug because the error message does not align with the reason for the error.

@bmicklea bmicklea added this to the 5.0.0-M6 milestone Oct 3, 2016
@bmicklea bmicklea changed the title Remote build context fails when specifying a git repository rather than a direct link to a Dockerfile Remote build context in compose file fails when using a git repo rather than a direct link to a Dockerfile Oct 3, 2016
@ghost
Copy link
Author

ghost commented Oct 4, 2016

The error message says it all - no git. We should install git on machine nodes to make it happen.

@bmicklea
Copy link

bmicklea commented Oct 4, 2016

Note - this will need to work with private git repos.

@bmicklea
Copy link

bmicklea commented Oct 4, 2016

This is critical to M6.

@bmicklea
Copy link

bmicklea commented Oct 5, 2016

@riuvshin this is in-progress, correct?

@riuvshin
Copy link
Contributor

riuvshin commented Oct 6, 2016

@bmicklea not yet.

@vkuznyetsov vkuznyetsov added status/open-for-dev An issue has had its specification reviewed and confirmed. Waiting for an engineer to take it. sprint/current labels Oct 6, 2016
@TylerJewell
Copy link

@bmicklea - this issue is more challenging than to just install git. It also requires sys admins to upload their corporate keys to codenvy so that those keys can be installed on each node where git resides. Those keys will be needed to clone from a private repo.

@riuvshin
Copy link
Contributor

riuvshin commented Oct 6, 2016

@bmicklea @TylerJewell right, on our side I will make sure with puppet that git is installed everywhere it is needed. But adding keys will be manual documented part.

@riuvshin
Copy link
Contributor

riuvshin commented Oct 6, 2016

@bmicklea btw I don't see why it is for M6 I could add this even to M5 because it its easy to install git. Pr proposed

@TylerJewell
Copy link

Ok for M5. If we have to tell customers how to install the git keys manually, can we get a short document / howto on what we need to tell customers to do? Just add the instructions here into this issue and we'll get them into docs.

@riuvshin riuvshin modified the milestones: 5.0.0-M5, 5.0.0-M6 Oct 6, 2016
@ghost
Copy link
Author

ghost commented Oct 7, 2016

@JamesDrummond can you please add the following to Che docs?

To use private repositories in compose build context one needs to:

  • use ssh git URL in a Composefile
  • on a machine node (or locally on a Che machine) have a private key - id_rsa (this name only!)
  • the key should have the following permissions 0600
  • before trying the recipe, add github.com to known_hosts manually by executing the following command:

ssh -o StrictHostKeyChecking=no -T git@github.com

In Codenvy we install git on machine nodes (M5 milestone). And I suppose everyone using Che has git installed locally )

@riuvshin riuvshin closed this as completed Oct 7, 2016
@bmicklea bmicklea mentioned this issue Oct 8, 2016
56 tasks
@vkuznyetsov vkuznyetsov removed sprint/current status/open-for-dev An issue has had its specification reviewed and confirmed. Waiting for an engineer to take it. labels Oct 13, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/bug Outline of a bug - must adhere to the bug report template.
Projects
None yet
Development

No branches or pull requests

5 participants