eclipse/Git in openshift v3

70 views Asked by At

I have been using eclipse (with openshift plugin) for my Openshift v2 project. Now, I have to migrate.

In Openshift v2, I run local git repositories. Each repository branch has a correpsonding remote (I assume in Openshift V2). I can push/pull etc between local and remote branches. I rarely use rhc nor did I use git command line on my local machine.

In Openshift v3, it seems that I cannot interact with remote Git repositories in Openshift from Eclipse: everything goes through https://github.com. After going through several "migration guidelines", I suspect this will be how to use Eclipse with Openshift V3:

  1. Develop code (mine is JavaEE + Springframework + Mysql) on Eclipse and local git repositories;
  2. Push the code to Github.com repositories (if I don't want to open my code to public, I pay for a private repository at https://github.com);
  3. Use oc command line to get code from github.com into my Openshift V3 project.

Do I get this right?

In Openshift V3, is it possible I can do push code into Openshift project from eclipse directly, without going through github.com?

1

There are 1 answers

0
luciddreamz On

Correct. To keep that same workflow, you need an external git repo in v3. You don't have to use a paid GitHub.com to get private repos. Sign up for a free account on GitLab.com or Bitbucket.com - both include free private repos.

Then, check out this blog post series on best practices for using private git repos with OpenShift v3, which links to several guides on the subject: https://blog.openshift.com/private-git-repositories-part-1-best-practices/

Note: I prefer just sticking with an external private git repo, but if you don't want to go that route, you can use binary builds, as outlined here: https://stackoverflow.com/a/45892603/663541