> For the complete documentation index, see [llms.txt](https://revdebug.gitbook.io/revdebug/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://revdebug.gitbook.io/revdebug/how-to-guides/connecting-git-repository-using-ssh-keys.md).

# 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="/files/dEeKlOUnMPwRLELOFXvU" 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)
