> ## Documentation Index
> Fetch the complete documentation index at: https://docs.paradime.io/llms.txt
> Use this file to discover all available pages before exploring further.

# setGitRepository

> Sets how the API key's workspace connects to its repository.



**mutation** `setGitRepository(baseUrl: String, installationId: String, mode: GitConnectionMode!, projectId: String, repoId: String): SetGitRepository`

## Arguments

**`baseUrl`**: `String`

GITLAB_APP only: the GitLab connection's base URL

---

**`installationId`**: `String`

GITHUB_APP only: an installation the company holds

---

**`mode`**: `GitConnectionMode!` (required)

---

**`projectId`**: `String`

GITLAB_APP only: the project's numeric GitLab id

---

**`repoId`**: `String`

GITHUB_APP only: the repository's numeric GitHub id

## Returns

`SetGitRepository`

**`ok`**: `Boolean!`

---

**`connection`**: `GQLGitConnection!`



## Related topics

- [Connect through the GitHub App](https://docs.paradime.io/products/settings/git-repositories/connect-with-github-app.md)
- [Workspace Management API](https://docs.paradime.io/developers/graphql-api/api-reference/workspace-management-api.md)
- [Clone your repository through the GitHub App, not only an SSH deploy key](https://docs.paradime.io/changelog/2026-11-04/github-app-connection.md)
- [Git Repositories](https://docs.paradime.io/products/settings/git-repositories/index.md)
- [Connect a GitLab repository](https://docs.paradime.io/integrations/gitlab/connect-a-repository.md)


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.