The jBPM 7.43.1 Git repository only serves localhost by default. If you have the jBPM server on a machine other than where you are developing, it is required to enable this repository to be allowed on all network interfaces in addition to localhost.
When I try to clone a project from a machine other than the server, I get the following error:
[operatorfeitam@localhost lab]$ git clone ssh://wbadmin@dev02:8001/MySpace/my-new-project
Cloning into 'my-new-project'...
ssh: connect to host dev02 port 8001: Connection refused
fatal: Could not read from remote repository.
Please make sure you have the correct access rights
and the repository exists.
[operatorfeitam@localhost lab]$
To allow access from another machine it is necessary to specify the following configuration file properties:
org.uberfire.nio.git.ssh.host
org.uberfire.nio.git.ssh.hostname
These two properties have the default value of localhost, and to be allowed access by all interfaces it is required to assign the value "0.0.0.0".
This can be done in the configuration file used when booting or adding as parameters in the boot script. In my case I am booting into standalone mode using the standalone.sh script located in the path /bin to which I add the different configuration options without having to modify the original configuration files. My boot script remains with these two new parameters:
#!/bin/bash
# *****************************************************************************
# functionality: start jBPM server 7.43.1 with a specific runtime where the
# guvnor repository and the security and .niogit directories are located
# IMPORTANT: Ports required 8080 y 8443
# **********************************************************
export ROOT_AKYGU_HOME=/workspaces/eclipse/feitam/akygu
export EAP_HOME="$ROOT_AKYGU_HOME/tools/jbpm-server-7.43.1"
export JBPMSERVER7431_RUNTIME_HOME="$ROOT_AKYGU_HOME/runtime/tools/jbpm-server-7.43.1"
../tools/jbpm-server-7.43.1/bin/standalone.sh -Dorg.uberfire.nio.git.ssh.hostname=0.0.0.0 -Dorg.uberfire.nio.git.ssh.host=0.0.0.0 -Dorg.uberfire.nio.git.dir=$JBPMSERVER7431_RUNTIME_HOME -Dorg.uberfire.nio.git.ssh.cert.dir=$JBPMSERVER7431_RUNTIME_HOME -Dorg.uberfire.metadata.index.dir=$JBPMSERVER7431_RUNTIME_HOME -Dorg.guvnor.m2repo.dir=$JBPMSERVER7431_RUNTIME_HOME/repository
After restarting the jBPM service with these changes we can now access the jBPM Git repository from another machine:
[operatorfeitam@localhost lab]$ git clone ssh://wbadmin@dev02:8001/MySpace/my-new-project
Cloning into 'my-new-project'...
The authenticity of host '[dev02]:8001 ([192.168.1.138]:8001)' can't be established.
RSA key fingerprint is SHA256:Q62KpKGIGzIS5H2qU2airI/27KG4vbGMP6t9teMzAO4.
RSA key fingerprint is MD5:9c:b5:27:7f:06:a2:e0:42:8e:83:ea:2a:44:c5:10:8f.
Are you sure you want to continue connecting (yes/no)? yes
Warning: Permanently added '[dev02]:8001,[192.168.1.138]:8001' (RSA) to the list of known hosts.
Cloning into 'my-new-project'...
Password authentication
Password:
remote: Total 515 (delta 0), reused 515 (delta 0)
Receiving objects: 100% (515/515), 106.59 KiB | 0 bytes/s, done.
Resolving deltas: 100% (247/247), done.
[operatorfeitam@localhost lab]$
However, it is necessary to open on the server that provides the jBPM service allow in the firewall to access by TCP port 8001 of the service that manages the jBPM Git repository, with the following commands in the case of a CentOS 8, but that are similar in any linux distribution:
firewall-cmd --zone=public --permanent --add-port 8001/tcp
firewall-cmd --reload