---
title: "Update a GitOps source's access control"
method: PUT
path: "/gitops/sources/{id}/access"
tags: ["gitops"]
---

# Update a GitOps source's access control

`PUT /gitops/sources/{id}/access`

Updates the access control settings for an existing GitOps source.
**Access policy**: administrator

## Path parameters

- `id` integer, required

## Request body

- SourcesSourceAccessUpdatePayload
  - `public` boolean
  - `teams` integer[]
  - `users` integer[]

## Response `200`

OK

- PortainerSource
  - `administratorsOnly` boolean
  - `git` GittypesGitSource
    - `Authentication` GittypesGitAuthentication
      - `AuthorizationType` integer
      - `GitCredentialID` integer
      - `Password` string
      - `Provider` integer
      - `Username` string
    - `TLSSkipVerify` boolean
    - `URL` string
  - `helm` PortainerHelmConfig
    - `Atomic` boolean — Atomic enables automatic rollback on deployment failure (equivalent to helm --atomic). Used by both git repo and Helm repository deployments.
    - `ChartName` string — ChartName is the name of the Helm chart within the repository. Required for Helm repository deployments.
    - `ChartPath` string — ChartPath is the path to a Helm chart folder within the cloned git repository. Used exclusively for git repo helm deployments. Mutually exclusive with ChartURL.
    - `ChartURL` string — ChartURL is the URL of a Helm chart repository. Used exclusively for Helm repository deployments. Mutually exclusive with ChartPath.
    - `ChartVersion` string — ChartVersion is the version of the Helm chart to deploy. Empty means latest. Used exclusively for Helm repository deployments.
    - `Namespace` string — Namespace is the Kubernetes namespace to deploy the Helm chart into. Used by both git repo and Helm repository deployments.
    - `Timeout` string — Timeout sets the deadline for Helm operations (equivalent to helm --timeout, e.g. "5m0s"). Used by both git repo and Helm repository deployments.
    - `ValuesFiles` string[] — ValuesFiles is a list of relative paths to Helm values YAML files within the cloned git repository. Used exclusively for git repo helm deployments.
    - `ValuesInline` string — ValuesInline is the inline YAML string of Helm values. Used exclusively for Helm repository deployments.
  - `id` integer
  - `interval` string
  - `lastSync` integer
  - `name` string
  - `ownerID` integer
  - `public` boolean
  - `registry` PortainerRegistry
    - `AccessToken` string — Stores temporary access token
    - `AccessTokenExpiry` integer
    - `Authentication` boolean — Is authentication against this registry enabled
    - `AuthorizedTeams` integer[] — Deprecated in DBVersion == 18
    - `AuthorizedUsers` integer[] — Deprecated in DBVersion == 18
    - `BaseURL` string — Base URL, introduced for ProGet registry
    - `Ecr` PortainerEcrData
      - `Region` string
    - `Github` PortainerGithubRegistryData
      - `OrganisationName` string
      - `UseOrganisation` boolean
    - `Gitlab` PortainerGitlabRegistryData
      - `InstanceURL` string
      - `ProjectId` integer
      - `ProjectPath` string
    - `Id` integer — Registry Identifier
    - `ManagementConfiguration` PortainerRegistryManagementConfiguration
      - `AccessToken` string
      - `AccessTokenExpiry` integer
      - `Authentication` boolean
      - `Ecr` PortainerEcrData
        - `Region` string
      - `Password` string
      - `TLSConfig` PortainerTLSConfiguration
        - `TLS` boolean, required — Use TLS
        - `TLSCACert` string — Path to the TLS CA certificate file
        - `TLSCert` string — Path to the TLS client certificate file
        - `TLSKey` string — Path to the TLS client key file
        - `TLSSkipVerify` boolean, required — Skip the verification of the server TLS certificate
      - `Type` 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8
      - `Username` string
    - `Name` string — Registry Name
    - `Password` string — Password or SecretAccessKey used to authenticate against this registry
    - `Quay` PortainerQuayRegistryData
      - `OrganisationName` string
      - `UseOrganisation` boolean
    - `RegistryAccesses` PortainerRegistryAccesses
    - `TeamAccessPolicies` PortainerTeamAccessPolicies
    - `Type` 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8
    - `URL` string — URL or IP address of the Docker registry
    - `UserAccessPolicies` PortainerUserAccessPolicies
    - `Username` string — Username or AccessKeyID used to authenticate against this registry
  - `status` 0 | 1 | 2
  - `statusError` string
  - `teamAccesses` integer[]
  - `type` 0 | 1 | 2 | 3
  - `userAccesses` integer[]

## Other responses

- `400` — Invalid request payload
- `403` — Access denied
- `404` — Source not found
- `500` — Server error

---

[API](https://skmtc.net/portainer/apis/portainerce-api.md) · [All operations](https://skmtc.net/portainer/apis/portainerce-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/portainer/portainerce-api/versions/c0b0975cd11b/schema)
