Skip to content

Workspace Setup

Jim Krueger edited this page Mar 11, 2020 · 15 revisions

Step B: Setting up the Open Liberty repository and workspace.

Complete the following steps to setup your Eclipse environment for your Open Liberty repository and workspace. Ensure that you use the eclipse installation which included Bnd Tools.


Step 1 : Clone the open-liberty repository

Windows users: Run everything here in a Git bash window

First, create a directory on your local system to hold the source code.

mkdir libertyGit

cd libertyGit

Windows users: Set this config flag to allow file paths to go beyond 260 chars.

git config --global core.longpaths true

Clone the main repository onto your local system via this command.

git clone git@github.com:OpenLiberty/open-liberty.git

If you run into checkout or SSH issues during the clone, see the Troubleshooting page for help.


Step 2 : Create a fork of open-liberty

To contribute to open-liberty, you need a fork of the repository.

Navigate to the open-liberty page and click the Fork button in the top upper right corner and select your account as the location to hold the fork. Already have a fork, you say? Well, click the Fork button anyway, and you will see your existing fork.
You need a fork called named /open-liberty , a fork called was-liberty/open-liberty is not what you need for this step and just shows you are a confused admin.


Step 3 : Add your fork as a git remote

Your fork is the outbound part of the git triangular workflow. To allow you to push to your fork, we need to add it as a git remote.

GitHub Triangular Workflow

cd open-liberty

git remote add my_fork git@github.com:<your username>/open-liberty.git

Next, configure the local repository to push your commits to the fork repository you created above:

git config remote.pushdefault my_fork

This will now pull from origin, the main repository, and push to the fork, your fork repository.

This option requires at least Git 1.8.4. It is also recommended that you configure

git config push.default simple

unless you are already using Git 2.0 where it is the default.

You can run the following command to verify your triangle was created successfully:

git remote -v

You should see output similar to the following:

$ git remote -v

my_fork git@github.com:<your username>/open-liberty.git (fetch)

my_fork git@github.com:<your username>/open-liberty.git (push)

origin git@github.com:OpenLiberty/open-liberty.git (fetch)

origin git@github.com:OpenLiberty/open-liberty.git (push)

You will need to setup your 'master' branch since integration is the default:

$ git checkout -b master origin/master

$ git pull

$ git push

Finally, IBM contributors may need to configure their Artifactory Auth Token.


Clone this wiki locally