Skip to main content
Connect Sourcegraph so CloudThinker can search code, repositories and code host sync health, and add, change or remove repository metadata (tags) after you approve it. It signs in with an access token.

Prerequisites

  • An existing Sourcegraph account or deployment containing the resources you want to inspect.
  • Permission to create or obtain the credential described below.
  • A CloudThinker workspace role that can add connections; see Roles.
  • An HTTPS route from CloudThinker to your service. For a private service, see Reaching private services.

Setup

1

Prepare the credential

Obtain a Sourcegraph access token from the account that should perform searches. See the vendor’s authentication documentation for the procedure that applies to your account.
2

Add the connection

Open Settings → Connections, find Sourcegraph, and click Connect. Enter the values in Connection details.Use your Sourcegraph instance URL. Keep TLS verification enabled when its certificate is trusted.
3

Check the result

Click Connect and wait for the connection check.Success state: the connection shows Connected. Run the verification prompt below and confirm that the expected resources appear.

Connection details

Required permissions

Read: the token’s user can read the repositories you want searched; search sees only cloned repositories. Repository stats and code host sync health need a site admin token. Change metadata: Sourcegraph must allow the token’s user to edit metadata on that repository. If it refuses, use a user that can.

Agent capabilities

Changes run only after you approve them. Agents show the current and new value first. Batch changes, settings and code host changes stay in Sourcegraph.

Verify the connection

Confirm that the returned scope matches the credential you intended to connect. An empty result can mean missing data or restricted access; it is not proof that the service is healthy.

Example prompts

Troubleshooting

Sourcegraph answers 401. Create a new token under Settings → Access tokens and reconnect.
These need a site admin token. Use one, or skip those sections.
The instance uses a self-signed certificate. Reconnect with TLS certificate set to Skip SSL verification.
It must be the instance root. Reconnect with the exact https address.

Security

  • Least privilege — grant only the permissions the agents need for your use case; start read-only and widen later.
  • Read-only by default — use read-only credentials unless you want agents to make changes through this connection.
  • Rotate credentials — rotate keys and tokens on your normal schedule; CloudThinker picks up the new value when you update the connection.
  • Revoke on offboarding — remove the credential at the provider when you delete a connection or a teammate leaves.
  • Keep this integration’s credential separate from personal daily-use credentials where your provider supports it.
  • Revoke or rotate it in Sourcegraph when access is no longer needed, and update the connection after rotation.

Connections

Manage access to the services CloudThinker investigates.

Approvals

Control which requested changes can run.