Method: projects.repos.create

Creates a repo in the given project with the given name.

If the named repository already exists, repos.create returns ALREADY_EXISTS.

HTTP request

POST https://sourcerepo.googleapis.com/v1/{parent=projects/*}/repos

The URL uses Google API HTTP annotation syntax.

Path parameters

Parameters
parent

string

The project in which to create the repo. Values are of the form projects/<project>.

Authorization requires the following Google IAM permission on the specified resource parent:

  • source.repos.create

Request body

The request body contains an instance of Repo.

Response body

If successful, the response body contains a newly created instance of Repo.

Authorization

Requires one of the following OAuth scopes:

  • https://www.googleapis.com/auth/source.read_only
  • https://www.googleapis.com/auth/source.read_write
  • https://www.googleapis.com/auth/cloud-platform

For more information, see the Auth Guide.

Monitor your resources on the go

Get the Google Cloud Console app to help you manage your projects.

Send feedback about...

Cloud Source Repositories