> For the complete documentation index, see [llms.txt](https://docs.appsurify.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.appsurify.com/getting-started/step-2-connect-repository.md).

# Step 2: Connect Repository

Start Pushing Commit Metadata

## 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="https://209747829-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F4T7DHW2jpYykW9Zaqh7V%2Fuploads%2FZzEexrSvkK6zEn97W5GU%2Fimage.png?alt=media&amp;token=4c5f5861-bb60-494f-86a1-c78f4f9d0162" 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
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

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

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://docs.appsurify.com/getting-started/step-2-connect-repository.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

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.
