How to configure BRMS 6 server to use remote git repository to store assets?
Environment
- Red Hat JBoss BPM Suite (BPMS)
- 6.0.x
- 6.2
- Red Hat JBoss BRMS (BRMS)
- 6.0.x
- 6.2
Issue
- How to configure BRMS server to use remote git repository to store assets?
- How to configure BRMS to connect to my own GIT Server?
- I get an error when I try to clone from GitHub.
Can't clone repository. java.lang.RuntimeException: java.lang.RuntimeException: ssh://git@github.com:22: org.eclipse.jgit.transport.CredentialItem$YesNoType:The authenticity of host 'github.com' can't be established. RSA key fingerprint is xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx. Are you sure you want to continue connecting?
Resolution
BRMS
/BPM Suite
uses a local git
repository called Knowledge store
to store each project created through Business Central
console. It connects with the Git
repository that allows users to store different kinds of knowledge assets and artifacts at a single location. BRMS
/BPM Suite
uses a local Maven repository
to store the kjars
generated when users click over Build/Deploy
button. So, there are two kinds of repository.
- Git repository
which is used to store the sources,
- Maven repository
to store kjars
.
Configuring remote for a local repository
The BRMS
/BPM Suite
Git repository
does not have such a feature to automatically send content to another remote Git repository
when Build/Deploy
button is clicked from the UI. Users have to push BRMS
/BPM Suite
server repository assets (i.e. rules, process definitions, etc.) to remote Git repository
using git
command like it is shown below.
1) go to .niogit/repository1
folder in the BRMS
/BPM Suite
installation:
$JBOSS_HOME/bin/.niogit/repository1.git
2) add the Github repo
as a remote to that local BRMS Git
repository:
git remote add origin git@valid.address/remote_repo.git
3) check if it was added correctly
git remote -v
origin git@valid.address/remote_repo.git (fetch)
origin git@valid.address/remote_repo.git (push)
4) push the content of local repository to the remote one
git push origin master
Cloning remote repository
1) [Authoring]->[Administration]
2) [Repositories]->[Clone repository]
3) Provide information then click OK
Repository Name: <repository-name>
Organization Unit: <organization-name>
Git URL: <git-https-url> for example, https://github.com/<username>/<repo-name>.git
User Name: <git-username>
Password: <git-password>
Using ssh in Business Central
[Clone repository] has some problems (Business Central
doesn't support scp style ssh URL, this bugzilla 1299619 was opened to it also passphrase would cause some problem when is used a basic ssh URL). So use https or git protocol here.
4) Go to the created repository
$ cd $JBOSS_HOME/bin/.niogit/<repo-name>.git
5) Change the remote URL
$ git remote set-url origin git@github.com:<username>/<repo-name>.git
6) Check if it was added correctly
$ git remote -v
origin git@github.com:<username>/<repo-name>.git (fetch)
origin git@github.com:<username>/<repo-name>.git (push)
7) push the content of local repository to the remote one
git push origin master
Post-Commit Git Hook
Since BRMS 6.2.0, the user can add a custom post-commit
git hook for further automation. Please refer to How to configure git hooks in B*MS 6.2 for more details.
This solution is part of Red Hat’s fast-track publication program, providing a huge library of solutions that Red Hat engineers have created while supporting our customers. To give you the knowledge you need the instant it becomes available, these articles may be presented in a raw and unedited form.
Comments