# Connecting GIT repository using SSH keys

RevDeBug recordings are overlayed on source code fetched directly from GIT repository.

Repository **configuration** using login and password and HTTP/HTTPS transport for projects can be set up inside **Settings** >  **Repository Configuration**.&#x20;

When SSH transport is required, the following steps are needed:

* A private password-less SSH key for a service user, preferably read-only, needs to be uploaded into `/var/revdebug/git-ssh-key-dir/` folder on the RevDeBug Server (location can differ depending on `REVDEBUG_VOLUME_GIT_SSH_KEYS` server configuration setting).
* Repository address in **Settings** >  **Repository Configuration**, have to be set in a format similar to:\
  `git@gitlab.com:revdebug/python/rdbcpython.git`
* **Login** and **Password** fields are to remain empty.

<figure><img src="https://1776828725-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MTk4m0D_HMejz7b-sEi%2Fuploads%2FFKuvAWCWe2lWqLlSs7KA%2FrepositoryConfigurationFinal.png?alt=media&#x26;token=0b492f1a-545c-43b8-9f9b-d2e2d3bbafd6" alt=""><figcaption></figcaption></figure>

### **Refspec git support**

Your program code can be auto-loaded from your repo even when you use a non-default refspec. All you have to do to link the code from the custom refspec is to configure "Additional refspecs".

```
refs/path/in/revdebug/*:refs/path/to/remote/refspece/*
```

More information on refspec can be found [here](https://git-scm.com/book/en/v2/Git-Internals-The-Refspec)
