Skip to content

Git Repository Integration

We recommend as Best Practice to store your Botium test cases in a Git repository, and connect your Git repository to Botium Box.

Git Repository Registration

In the Botium Box registration page, it is possible to

  • set the Git Clone Url

  • the Git User

  • and the Git Password

You can do additional configuration with environment variables. All of those environment variables have to be to given to the Botium Box Server and all Botium Box Agents.

Detailed Git Configuration

For all of the following environment variables, there are two simple rules.

The environment variable can be used multiple times by adding a suffix of your choice

  • BOTIUMBOX_GIT_IGNORECERTIFICATE_0=…
  • BOTIUMBOX_GIT_IGNORECERTIFICATE_1=…

Botium Box will recognize all of them.

Each environment variable optionally starts with a prefix, which is matched with the current Git Clone Url. For example, this environment variable is only applied if the Git Repository is on Bitbucket:

  • BOTIUMBOX_GIT_IGNORECERTIFICATE=bitbucket 1

Using these two rules together, you can apply different configuration for each of your Git Repositories.

Ignoring SSL Certificate Problems

Environment Variable: BOTIUMBOX_GIT_IGNORECERTIFICATE

1 to ignore SSL errors

Git User and Password

Environment Variable: BOTIUMBOX_GIT_USER and BOTIUMBOX_GIT_PASSWORD

Used for HTTP/HTTPS Clone Urls only

Git SSH Keys

Environment Variable: BOTIUMBOX_GIT_PUBLICKEY and BOTIUMBOX_GIT_PRIVATEKEY and BOTIUMBOX_GIT_PASSPHRASE

Used for SSH Key authentication, for respective Clone Urls only. The public key and private key setting have to point to the SSH key files (usually id_rsa.pub and id_rsa). If protected by a passphrase, add it as well.

Note

Place those SSH key files in the resources folder of your Botium Box installation and use relative filenames (./resources/my-key-dir/id_rsa)

Proxy Settings

Environment Variable: BOTIUMBOX_GIT_PROXY_URL and BOTIUMBOX_GIT_PROXY_USER and BOTIUMBOX_GIT_PROXY_PASSWORD

In case you are using a corporate proxy to connect to the Git Repository, add the Proxy Url and if required username/password for proxy access.

Example: Bitbucket with HTTPS

In Botium Box Git Repository registration, adding this as Git Clone Url:

https://botium@bitbucket.org/botium/testbox.git

We can enter the user and password directly in this view, or we can use environment variables:

BOTIUMBOX_GIT_USER_0=testbox.git mybitbucketuser
BOTIUMBOX_GIT_PASSWORD_0=testbox.git mybitbucketpassword

Example: Bitbucket with SSH

In Botium Box Git Repository registration, adding this as Git Clone Url:

botium@bitbucket.org:botium/testbox.git

Note

Please note that the first part of this url is your Bitbucket username (when copying the Clone Url from Bitbucket, this is set to git by default and you have to change it)

We already set up the SSH keys in Bitbucket, and we placed the id_rsa and id_rsa.pub files in the resources folder of the Botium Box. Now we have to use some environment variables:

BOTIUMBOX_GIT_PUBLICKEY_0=testbox.git resources/id_rsa.pub
BOTIUMBOX_GIT_PRIVATEKEY_0=testbox.git resources/id_rsa