# 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="https://3406482452-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FvzFLT4zSSU6J1uzbt5OF%2Fuploads%2FH0VpnhjKF5feA0tJWIQS%2Frg10.png?alt=media&#x26;token=40550430-0c98-4ce6-85a5-28c5c4aadff9" 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="https://3406482452-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FvzFLT4zSSU6J1uzbt5OF%2Fuploads%2FeVM5uHHLV6WZxEPusW3t%2Frg11.png?alt=media&#x26;token=b378fbce-cf3f-4a22-b7aa-5ba5d0ecef4a" 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="https://3406482452-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FvzFLT4zSSU6J1uzbt5OF%2Fuploads%2FnU2yfymtGhoedwFDRQRr%2Frg121.png?alt=media&#x26;token=9b3a565d-ba9e-44e2-9c2d-9b75be2e2218" 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="https://3406482452-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FvzFLT4zSSU6J1uzbt5OF%2Fuploads%2FOzg2rZbUYlAZPSRChKRi%2Frg12.png?alt=media&#x26;token=4f64132c-436c-4f65-8262-02ea4d9e93c8" alt="" width="375"><figcaption></figcaption></figure>

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

<figure><img src="https://3406482452-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FvzFLT4zSSU6J1uzbt5OF%2Fuploads%2FWeIv295WPQfGbdbfWqok%2Frg13.png?alt=media&#x26;token=5525637f-9682-4012-909d-c53bbe20cabd" 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="https://3406482452-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FvzFLT4zSSU6J1uzbt5OF%2Fuploads%2FZNzcnZu0S0iU2Xb4stH6%2Frg14.png?alt=media&#x26;token=96822b86-459d-47ec-86a9-51aafa5842b3" 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="https://3406482452-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FvzFLT4zSSU6J1uzbt5OF%2Fuploads%2FxUrPq5Svbb0ljqXSVvf6%2Frg15.png?alt=media&#x26;token=decac4fe-f4c7-482a-8a0d-0efa331b3029" 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="https://3406482452-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FvzFLT4zSSU6J1uzbt5OF%2Fuploads%2FHhzsIp67ee45VKi2tYjT%2Frg16.png?alt=media&#x26;token=6b7f0fe7-f689-48ed-93b8-dc4a7b6bb6b3" 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="https://3406482452-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FvzFLT4zSSU6J1uzbt5OF%2Fuploads%2FNR2UdZDxjvDgiGuAj48k%2Frg17.png?alt=media&#x26;token=971cbf09-5745-4637-b26c-643f4bba6e67" 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.
