---
title: "Test a Git source connection"
method: POST
path: "/gitops/sources/test"
tags: ["gitops"]
---

# Test a Git source connection

`POST /gitops/sources/test`

Tests connectivity for Git connection details that have not been persisted yet.
**Access policy**: authenticated

## Request body

- SourcesGitSourceCreatePayload
  - `administratorsOnly` boolean
  - `authentication` SourcesGitAuthenticationPayload
    - `password` string
    - `username` string
  - `interval` string
  - `name` string
  - `public` boolean
  - `teamAccesses` integer[]
  - `tlsSkipVerify` boolean
  - `url` string, required
  - `userAccesses` integer[]

## Response `200`

Connection test result

- SourcesConnectionTestResult
  - `error` string
  - `success` boolean

## Other responses

- `400` — Invalid request payload
- `403` — Access denied
- `500` — Server error

## Changes

- **2026-07-14** `ed66ad97ff9a` — 1 info
  - added the new optional request property `interval`
- **2026-07-07** `f944baf68a3e` — 1 warning
  - removed the request property `interval`

[Change history](https://skmtc.dev/portainer/apis/portainerce-api/changes/gitops/sources/test/post.md)

---

[API](https://skmtc.dev/portainer/apis/portainerce-api.md) · [All operations](https://skmtc.dev/portainer/apis/portainerce-api/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/portainer/portainerce-api/revisions/6d8f5cab4e5a/schema)
