How to sync github and openshift git repository
Tech-Today

How to sync github and openshift git repository


OpenShift is such a wonderful playground for those who want to try and experience real javaee6/jboss cloud hosting. But often some of us wanted to host the code in another git repository like github or bitbucket or somewhere else. This article will try to explain how we can synchronize between 1 git repository to another.

Before we begin you should have:
1.) Eclipse with maven plugin and egit plugin.
2.) An account in OpenShift with JBoss7 application, some instructions can be found here:
https://www.openshift.com/get-started

The following steps will clone a repository from OpenShift and add a GitHub repository to it. So you can merge them.

Steps:
1.) Clone your OpenShift repository. Open Git Repository view and click Clone a Git repository.

2.) Select the master branch, and enter parameters like where you want to save the repository, etc.

3.) Next you have to add Github to the Remotes repository section of the newly cloned one. But unfortunately, it's not working with eclipse egit plugin. So we have to execute in cmd.
  a.) Navigate to where you save the cloned OpenShift repository.
  b.) Execute: git remote add github -f https://github.com/czetsuya/crudfaces.git
       This will add my github remote repository to openshift clone.

4.) After adding the github repo, your Git Repositories view should look like:

*Notice that github, is added in the Remotes section.

5.) Since we wanted to merge openshift into github, first we need to checkout the github master branch.
  a.) In Branches->Remote Tracking menu, right click on github/master and then select Create a branch, enter github-master. Pull Strategy=None.

6.) And finally to merge OpenShift into Github, right click on Branches->Local->github-master, and select merge. Choose Remote Tracking->origin/master, which is the OpenShift master branch.

7.) You can now import the maven projects by, right click on repository and select Import Maven Projects.

Now you have a repository connected to OpenShit and at the same time can push to GitHub.




- Committing The Source Code On Github
Slack Discussion Repositories https://github.com/terawarehouse/terawarehouse-cataloghttps://github.com/terawarehouse/terawarehouse-reactTo commit our project in Github, make sure you already created a new Github repository and then: Get the repository...

- How To Initialize A Git Repository And Linked It To A Remote Repository Provider
For example we've just created a new project and want to push it to a remote repository. Here's what we need to do. Find out what is the repository url, you can see it at github. For example: https://github.com/czetsuya/JAX-RS-REST-Security.gitOpen...

- How To Deploy Jboss7.2 On Openshift
The following tutorial is a rough steps on how you can setup a custom server such as JBoss7.2 on OpenShift. Prerequisite, clone and checkout JBoss7.2 tag //clone the jboss repo >git clone https://github.com/jbossas/jboss-as.git //list the tags >git...

- How To Solve Git Permission Denied
I've encountered this GIT permission denied several times before each time I always come up with a different solution. This time from a friend of mine: Copy your private and public keys from c:\users\yourAccount\.ssh to where you install git. Normally...

- How To Clone A Project From Github And Import In Eclipse
This page will teach us how to clone a project from GitHub to your local repository and import in eclipse. Prerequisites: 1.) Windows/Ubuntu with JDK6/7. 2.) eclipse (I'm using Juno) with egit, m2eclipse, m2e-egit plugin (from eclipse marketplace)....



Tech-Today








.