To create a Git source in a project, go to the Administration view, then Projects, and identify the project in which you want to add the source. Click the icon in the Sources column and in the view that opens to you, and click Add Source.

Then, identify the type GIT source in the VCS section.

The parameters for creating a Git repository are :

  • URL: the url of the Git repository
  • Authentication:
    • If your repository is public and does not require authentication for read access, do not complete these fields.
    • If read access to your repository is private, please provide username and password.
  • Branch: The name of the development branch you want to analyze.
  • Use an SSH key: If the connection to the repository requires SSH access, check this box to use a SSH key to authenticate. If you generated the key with a passphrase, please enter it in the password field above.
  • SSH key: If you are using an SSH key, specify the name of the private key file, assuming that:
    • The key is in your folder ~/.ssh/
    • You shared this ~/.ssh folder with Themis by following this procedure.

Finish by clicking on Validate.

Example with SSH key authentication

Assume that to connect to your Git repository, you are using an SSH key authentication system. To allow Themis to connect to this Git server, the best way is to create a public / private key pair on the host machine (read access will be sufficient).

Important: Depending on the system used, the URL to use may be specific to an SSH key connection. For example, in the case of GitHub, if your repository is the following:

https://github.com/username/repo.git

the address to be entered in the URL field will be:

ssh://git@github.com/username/repo.git

To begin, follow this procedure to launch Themis to make access to SSH keys possible. Suppose you have generated the public key ~/.ssh/key_themis.pub and its private key ~/.ssh/key_themis. It must of course be ensured that this public key has been registered on the remote Git server.

Case of an SSH key with passphrase

Configure the source in Themis by:

  • ticking the box Use an SSH key
  • indicating the passphrase in the Password field
  • indicating key_themis in the SSH Key field


Case of an SSH key without passphrase

Configure the source in Themis by:

  • ticking the box Using an SSH key
  • indicating key_themis in the SSH Key field
Was this article helpful?
0 out of 0 found this helpful

Comments

0 comments

Please sign in to leave a comment.