For Agents
Create, list, and delete private Git repositories in Google Cloud, and manage their IAM policies. Suited for agents provisioning developer infrastructure inside a GCP project.
Get started with Cloud Source Repositories API in minutes using your preferred integration method.
# Add to your MCP client config (Claude Desktop, Cursor, Windsurf)
{
"jentic": {
"url": "https://api.jentic.com/mcp",
"auth": "oauth"
}
}
# Then ask your agent:
"create a Google Cloud source repository"
# → Jentic returns the GET /events tool with parameter schema, agent executes.What an agent can do with Cloud Source Repositories API API.
Create a new private Git repository under a Google Cloud project
List every repository in a project, paged for large org accounts
Delete a repository when a project is decommissioned
Configure project-level Pub/Sub topic mirroring of repository events
GET STARTED
Use for: I want to create a new private Git repo for my GCP project, List all source repositories in a project, Delete a Cloud Source Repository that is no longer needed, Grant a teammate write access to a Cloud Source Repository
Not supported: Does not handle pull requests, code review, issue tracking, or in-browser code editing — use for managing private Git repositories and their IAM in GCP only.
The Cloud Source Repositories API manages private Git repositories hosted in a Google Cloud project. It provides operations to create and delete repos, list the repos within a project, mirror an existing GitHub or Bitbucket repository, and manage IAM policies that govern who can push, pull, or administer each repository. The API also exposes project-level Pub/Sub mirroring configuration, useful when triggering CI builds from repository activity.
Mirror an external GitHub or Bitbucket repository into Cloud Source Repositories
Set, get, and test IAM policies that control push, pull, and admin access on a repo
Patterns agents use Cloud Source Repositories API API for, with concrete tasks.
★ Project Bootstrap Automation
When a new GCP project is provisioned for a team, an automation creates a default Cloud Source Repository, applies an IAM policy granting the team's group push access, and configures Pub/Sub mirroring so Cloud Build can react to commits. The Cloud Source Repositories API exposes each of these steps as a discrete call, so the bootstrap script completes in under a minute.
Create repo projects/myproj/repos/app, then setIamPolicy granting roles/source.writer to group:devs@example.com, then configure projectConfig with the build-events Pub/Sub topic.
GitHub Mirror for Compliance
Mirror business-critical GitHub repositories into Cloud Source Repositories so that audit logs and IAM controls live alongside other GCP resources. Calling repos.create with a mirrorConfig block establishes the one-way mirror; subsequent IAM and listing operations make the mirrored repo discoverable inside the project.
Call POST /v1/projects/myproj/repos with mirrorConfig.url=https://github.com/org/repo and a deployKeyId.
Access Review Reporting
An access-review job iterates every repository in each project, fetches its IAM policy, and produces a report listing who has roles/source.writer or roles/source.admin. This supports periodic audits required by SOC 2 controls. The repos.list and getIamPolicy endpoints are paginated and IAM-scoped, so the report can run unattended.
List all repos in projects/myproj, then for each call getIamPolicy and emit a row per binding.
AI Agent Repo Provisioning
An AI agent assigned to set up a new microservice asks Jentic for the operation that creates a Google source repository, loads the schema, then creates the repo and grants the requesting team push access — all without human intervention. Jentic handles the OAuth credential exchange so the agent never sees the underlying token.
Search Jentic for 'create a Google Cloud source repository', execute repos.create with the project parent, then setIamPolicy adding the new service team.
11 endpoints — the cloud source repositories api manages private git repositories hosted in a google cloud project.
METHOD
PATH
DESCRIPTION
/v1/{+parent}/repos
Create a new repository in a project
/v1/{+parent}/repos
List repositories in a project
/v1/{+name}
Get a single repository or project resource
/v1/{+name}:sync
Synchronise a mirrored repository
/v1/{+resource}:setIamPolicy
Set the IAM policy on a repository
/v1/{+resource}:getIamPolicy
Get the IAM policy on a repository
/v1/{+resource}:testIamPermissions
Test which permissions the caller holds on a repository
/v1/{+parent}/repos
Create a new repository in a project
/v1/{+parent}/repos
List repositories in a project
/v1/{+name}
Get a single repository or project resource
/v1/{+name}:sync
Synchronise a mirrored repository
/v1/{+resource}:setIamPolicy
Set the IAM policy on a repository
Three things that make agents converge on Jentic-routed access.
Credential isolation
Google service-account keys and OAuth tokens for Cloud Source Repositories are stored in the Jentic vault (MAXsystem). Agents call the API with scoped, short-lived access tokens — long-lived service-account JSON keys never enter the agent context.
Intent-based discovery
Agents search Jentic with intents like 'create a Google Cloud source repository' or 'set IAM policy on a Git repo', and Jentic returns the matching repos.create or setIamPolicy operation along with its request schema.
Time to first call
Direct Cloud Source Repositories integration: 1-2 days to set up service-account auth, scopes, and IAM policy plumbing. Through Jentic: under 1 hour to discover, schema-load, and execute.
Alternatives and complements available in the Jentic catalogue.
GitHub REST API
GitHub hosts repositories on its own platform with richer collaboration features; Cloud Source Repositories keeps repos inside a GCP project.
Choose GitHub when developer collaboration, pull requests, and reviews are the priority. Choose Cloud Source Repositories when the repository must live inside the customer's GCP project and inherit GCP IAM.
Cloud Build API
Cloud Build runs CI/CD pipelines triggered by commits in Cloud Source Repositories.
Use Cloud Build when you need to compile, test, or deploy code that lives in a Cloud Source Repository — it integrates natively via build triggers.
Google IAM API
IAM defines the roles and policies that Cloud Source Repositories enforces on each repo.
Use IAM directly when you are managing project-wide role grants. Use the per-repo setIamPolicy on Cloud Source Repositories for repo-scoped access decisions.
Specific to using Cloud Source Repositories API API through Jentic.
What authentication does the Cloud Source Repositories API use?
The Cloud Source Repositories API uses OAuth 2.0 with the cloud-platform or source.read_write scopes. Through Jentic, OAuth credentials are stored in the Jentic vault (MAXsystem) and exchanged for short-lived access tokens, so service-account keys never enter the agent context.
Can I mirror a GitHub repository into Cloud Source Repositories?
Yes. Pass a mirrorConfig block when calling POST /v1/projects/{project}/repos that specifies the source URL plus a deployKeyId and webhookId. Cloud Source Repositories then maintains a one-way mirror of the upstream GitHub or Bitbucket repository.
What are the rate limits for the Cloud Source Repositories API?
Quotas are set at the Google Cloud project level — typically a few hundred read or write requests per minute, with stricter limits on repo creation. Quotas can be inspected and adjusted in the Google Cloud Console under IAM and admin > Quotas.
How do I provision a new repo with IAM bindings through Jentic?
Search Jentic for 'create a Google Cloud source repository', execute the repos.create operation against POST /v1/{+parent}/repos, then call POST /v1/{+resource}:setIamPolicy on the new repo resource with the desired role bindings. Jentic returns the schemas for both calls so the agent can chain them in a single workflow.
Is the Cloud Source Repositories API free?
Cloud Source Repositories includes a free tier of up to 5 project users and 50 GB storage. Beyond that, Google charges per active user per month and per GB of storage. The API itself has no separate per-call charge.
Can I check if a service account can push to a repo before attempting?
Yes. POST /v1/{+resource}:testIamPermissions accepts a list of permissions like source.repos.update or source.repos.create and returns which of those the calling identity holds, which lets agents decide whether to attempt the operation or escalate.
/v1/{+resource}:getIamPolicy
Get the IAM policy on a repository
/v1/{+resource}:testIamPermissions
Test which permissions the caller holds on a repository