# Step 2: Connect Repository

## Repositories Supported

Appsurify supports all **Git-based, Microsoft TFVC, SVN,** and **Perforce** Repositories.&#x20;

**Repository Architectures** Supported:

* Monolithic
* Multi-Repo
* Microservices

## Connect Repository via CLI Script

The below example shows the `--gittoappsurify` command to push Commit Metadata to Appsurify. This command will push the project details and bind the Developer Repository so that Appsurify can see the changes and base it's Predictive Test Selection criteria based on areas of change from recent Commits.&#x20;

### \*Need to have Python 3.7 installed or higher\*

### Step 1: Install AppsurifyCI&#x20;

Place script in CLI (as seen in image below, and **above** --gittoappsurify)

```
--pip install --upgrade pip
```

Then Enter:

```
--pip install appsurifyci --upgrade
```

### Step 2: Enter your Script

**Example**:

```
--pip install appsurifyci --upgrade
```

**Then**

```
--gittoappsurify --start "latest" --url "https://testbraindemo.appsurify.com" --project "application" --token "NTk65cD1Ua3doV3luNDRuMjNCMDRjV2EVkx0dwzz" --branch "branch" --repo_name "repo"
```

## Script Parameters Defined

| Parameters                                   | Definition                                                                                                                                 |
| -------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------ |
| `--gittoappsurify`                           | Connection to Appsurify Servers                                                                                                            |
| `--start "latest"`                           | Latest Commit, needs FULL SHA                                                                                                              |
| `--url "https://ABC.appsurify.com"`          | Your Domain                                                                                                                                |
| `--project "application"`                    | the name of your Project during initial setup                                                                                              |
| `--token "API Key"`                          | <p>API Key found under your username in top right hand corner dropdown menu.<br><br>API Key can be configured in CI Server as a Secret</p> |
| `--branch "branch"`                          | Developer Branch we are targeting                                                                                                          |
| `--repo_name "repo"`                         | Name of Developer Repository we are targeting                                                                                              |
| `--debug`                                    | Prints out more information for any issues                                                                                                 |
| `git fetch --all then git checkout [branch]` | Issues with Connecting Repository...                                                                                                       |

#### Once the project is pushed, Appsurify will look it up and your Repo Bind will turn <mark style="color:green;">Green</mark> in the Summary Page and Appsurify will begin receiving regular Developer Commits.

<figure><img src="/files/2sP3c4YPNzJxQ8CuWBxR" alt="appsurify repository connection good"><figcaption></figcaption></figure>

If have any questions or for troubleshooting, please contact Appsurify [Customer Success](https://appsurify.com/contact/)

## Next: [Connect Tests](/getting-started/step-3-connect-tests.md)

\
Other Connection Types:
-----------------------

* SSH Key
* GitHub / Bitbucket APIs via Oauth (approval likely needed)
* Microsoft TFVC via Script
* Perforce Connection via Script
* SVN Connection via Script

If you'd like to Connect a Repository other than Git, please contact[ Appsurify Customer Success](https://appsurify.com/contact/).&#x20;


---

# 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.appsurify.com/getting-started/step-2-connect-repository.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.
