Create Internal Git Repository

This guide will walk you through creating an internal Git repository inside your self-hosted Git server. If a Git server is not available, then you can use your rok-tools management environment.

Note

If you already have an internal Git repository, you may proceed to the What’s Next section.

What You’ll Need

Choose one of the following options, based on who will host your internal Git repository.

  • Access to the internal Git server

Procedure

Choose one of the following options, based on who will host your internal Git repository.

  1. Log in to your Git server and create a bare repository:

    $ git init --bare <DIRECTORY>

    Replace <DIRECTORY> with the path to your codebase.

Choose one of the following options, based on where you have created your management environment.

  1. Create a bare repository from inside your bastion host:

    user@bastion:~$ kubectl exec -ti rok-tools-0 -- \ > git init --bare /root/deployments
  1. Create a bare repository from inside your bastion host:

    user@bastion:~$ docker exec -ti rok-tools \ > git init --bare /root/deployments
  1. Create a bare repository from inside your bastion host:

    user@bastion:~$ docker exec -ti rok-tools \ > git init --bare /root/deployments

Summary

You have successfully created the internal Git repository.

What’s Next

The next step is to fetch the Arrikto GitOps repository locally.