# Connecting a Remote Git Repo

In this example, we will be using [Github](https://github.com/) as a representative example of a platform where you have your git repository. You can use similar steps to connect git repos in other plaforms such as [Gitlab](https://about.gitlab.com/), [BitBucket](https://bitbucket.org/) and others.&#x20;

### Setup with GitHub using Deploy Keys

Let’s say we have a private GitHub Repository named `my-app` and want to use it for the Neurelo definitions in the project. The recommended way to connect the repository with Neurelo is to use the “Deploy Keys” feature.

* Copy the SSH URL for the Repository from GitHub

<figure><img src="/files/RPbdnQ1ygo2sWUhbnNQs" alt=""><figcaption></figcaption></figure>

* Next, Create a new Project in Neurelo, set the name and the database engine, check the “Use Remote Git Repository” check box, and click “Next.”

<figure><img src="/files/qPZr4GvTawB1lvcvn6FR" alt="" width="375"><figcaption></figcaption></figure>

* This will open the Repository Configuration. Select the “SSH” mode and enter the SSH URL we copied from GitHub in the “Repository URL.” In our example, the `main` is the default branch.

<figure><img src="/files/OUA7MEzK1RDdGvhPPJvs" alt="" width="375"><figcaption></figcaption></figure>

Next we need to add the Neurelo Public Key into the GitHub Repository

* Copy the Public Key from the Neurelo project

<figure><img src="/files/MnFQZ2S3p09JO2cuiDvz" alt="" width="375"><figcaption></figcaption></figure>

* Navigate to the Settings tab in your GitHub repository and open the “Deploy keys” page

<figure><img src="/files/ODNIy4dRlTbwzOZ8hsDw" alt=""><figcaption></figcaption></figure>

* Paste the Public Key from the Neurelo Remote Git Configuration Dialog. Ensure that “Allow write access” is enabled so Neurelo can commit the definitions.

<figure><img src="/files/JYg7z38INily3mPhueVA" alt=""><figcaption></figcaption></figure>

* Once added, the key will show up on the Deploy Keys page. It should have the “Read/write” permissions.

<figure><img src="/files/CBJxK6xrs8RD6tZfCZ5a" alt=""><figcaption></figcaption></figure>

### Test the Connection

* Once the Public key has been added, click “Test Connection” to ensure Neurelo can connect with your repository.

<figure><img src="/files/npg6G9Dj24wOjbqvRGF4" alt="" width="375"><figcaption></figcaption></figure>

* Wait for Neurelo to try to test the connection. Upon success, you will see a “Remote repo connection test completed successfully” toast. Click on “Create.”

<figure><img src="/files/GNInwm8QLMxJ0KGQIznA" alt=""><figcaption></figcaption></figure>

* If you navigate to the “Definitions” and open the history, you should be able to see the commits from your Git Repository.


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.neurelo.com/guides/remote-git-repository-for-definitions/connecting-a-remote-git-repo.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
