Auxiliary Tools :: GIT in Virtual Network for jBPM Development

 

in progress

Up to now, our network had the following configuration
(My jBPM Network Environment Configuration using VMware Workstation):

I will now extend the network with the GIT repository + two VM machines that will be clients of this repository:

(Rename pc-4-dev to pc-4-dev-1. Remember that VM host names I use are: pc-1, pc-2,… and VMware Workstation names are: pc-1-jboss-kie-server, pc-2-jbpm-db,…)

pc-5-git-repo; IP=192.168.195.105; remote git repository
pc-4-dev-1; IP=102.168.195.104; local git repository (client)
pc-6-dev-2; IP=102.168.195.106; local git repository (client)

Remote repository (pc-5-git-repo)

In case you want to share your files and access them from other machines, all you need to do is to create a bare repository (git init –bare) on a server (pc-5-git-repo) and push your changes there. A bare git repository is a special repository without a working directory.

systemctl enable sshd.service
systemctl start sshd.service
dnf install git

Create remote repository (pc-5):

  1. make dir: /var/repo/git/test-repo.git
  2. cd test-repo.git
  3. git init –bare

Local repository (pc-4-dev-1; from create up to push)

systemctl enable sshd.service
systemctl start sshd.service
dnf install git

Create local repository:

  1. make dir test-repo (I make it in /zibi)
  2. cd test-repo
  3. git init
  4. git config –global user.email “–your email–“
  5. git config –global user.name “your name” (in this case root)

Connect to remote repository:

  1. git remote add origin root@192.168.195.105:/var/repo/git/test-repo.git
    (if you want to change: “git remote set-url origin ….”)
  2. Verification:
    git remote -v

Commit and Push:

  1. create sample file: test.txt (in test-repo)
  2. git add .
  3. git commit -m “First commit”
  4. git push -u origin master

Local repository (pc-6-dev-2; clone, change, commit, push)

systemctl enable sshd.service
systemctl start sshd.service
dnf install git

  1. make dir {your dir}
  2. cd {your dir}

git clone ssh://root@192.168.195.105:/var/repo/git/test-repo.git


in root in my case:

 

Leave a Reply