Repositories

Create a repository in an organization

Changed on

The authenticated user must be an owner of the specified organization.

post/org/{org}/repos

Request

  • Base URL
    https://gogs.example.com/api/v1
  • Auth
    API key in header Authorization

Path parameters

orgstring required

Organization name

Request body

namestring required
descriptionstring
privateboolean
auto_initboolean
gitignoresstring
licensestring
readmestring
object_format'sha1' | 'sha256'

The hash algorithm of the repository. Defaults to the default of Git on the server.

Response

Created

idinteger
namestring
full_namestring
descriptionstring
privateboolean
forkboolean
parentRepository circular
emptyboolean
mirrorboolean
sizeinteger
html_urlstring
ssh_urlstring
clone_urlstring
websitestring
stars_countinteger
forks_countinteger
watchers_countinteger
open_issues_countinteger
default_branchstring
created_atstring date-time
updated_atstring date-time

Changes