How to Git Clone a Drools KIE WorkBench Repository

by | May 3, 2017

This information is for Drools 6.x releases. The steps to Git clone a Drools KIE WorkBench repository requires some basic git and command line understanding.

Overview

It’s useful to to have the Drools KIE WorkBench rule repositories available for local use – investigating problems, building outside of KWB, external archiving, etc.

Internally, the KIE WorkBench (starting with release 6.0) uses git to version control rules, facts, and system configuration. With a little configuration, we can access it just like any other git server.

The KWB git server uses the normal KWB users (which are Wildfly users with KIE roles), not new or special users, and does not use the OS’ ssh configuration.  These are important distinctions, and usually confuse initial KWB git users.

Git Clone It

It might already work, so try it. The KWB git server uses port 8001 for ssh protocol. The clone url syntax is:
git clone ssh://(username)@(domain):8001/(repoName)

For example, to clone a repo named MyRepo in a KWB running on my localhost with KWB user jeff, use:
git clone ssh://jeff@localhost:8001/MyRepo

Troubleshooting

If the Git clone is not working, review these steps to help find the issue.

  1. Enable access to the git server.
    By default it is on. Verify it’s not configured off.
    The property is: org.uberfire.nio.git.ssh.enabled=true
  2. Open firewall port 8001.
    If a firewall exists for the server, open port 8001 for ssh traffic.
  3. Configure SSH client to allow ssh-dss.
    KWB uses JGit and its SSH client creates a DSA certificate by default. Newer SSH clients have it turned off by default (deprecated).  To enable the SSH client to accept the DSA certificate, add a line “HostkeyAlgorithms +ssh-dss” to SSH config (SSH config is a file named “config” in the .ssh folder in your local user home directory).

Take a look at our related article: Simple Setup of Drools KIE WorkBench and KIE Server in One WildFly Instance

Need help with a project in Java? See for you! Just click the Discuss a Project button and tell us what you need.