GitHub Git API

Raw Git functionality.

Documentation

📖
Documentation
https://docs.github.com/en/rest/apps
📖
Documentation
https://raw.githubusercontent.com/api-evangelist/github/refs/heads/main/ https://docs.github.com/en/rest/authentication/authenticating-to-the-rest-api
📖
Documentation
https://docs.github.com/en/rest/codes-of-conduct/codes-of-conduct
📖
Documentation
https://docs.github.com/en/rest/emojis
📖
Documentation
https://docs.github.com/en/rest/gitignore
📖
Documentation
https://docs.github.com/en/rest/apps/installations
📖
Documentation
https://docs.github.com/en/rest/enterprise-admin
📖
Documentation
https://docs.github.com/en/rest/activity/events
📖
Documentation
https://docs.github.com/en/rest/orgs
📖
Documentation
https://docs.github.com/en/rest/rate-limit
📖
Documentation
https://docs.github.com/en/enterprise-cloud@latest/rest/scim
📖
Documentation
https://docs.github.com/en/rest/using-the-rest-api/getting-started-with-the-rest-api
📖
Documentation
https://docs.github.com/en/rest/teams
📖
Documentation
https://docs.github.com/en/rest/meta/meta
📖
Documentation
https://docs.github.com/en/rest/actions
📖
Documentation
https://docs.github.com/en/rest/branches
📖
Documentation
https://docs.github.com/en/rest/code-scanning
📖
Documentation
https://docs.github.com/en/rest/collaborators
📖
Documentation
https://docs.github.com/en/rest/dependabot
📖
Documentation
https://docs.github.com/en/rest/webhooks
📖
Documentation
https://docs.github.com/en/rest/pulls
📖
Documentation
https://docs.github.com/en/rest/git/tags
📖
Documentation
https://docs.github.com/en/rest/repos/autolinks
📖
Documentation
https://docs.github.com/en/rest/collaborators/invitations

Specifications

Other Resources

OpenAPI Specification

github-git-api-openapi.yml Raw ↑
openapi: 3.0.3
info:
  version: 1.1.4
  title: GitHub Application About Git API
  description: 'Use the REST API to retrieve information about GitHub Apps and GitHub App

    installations.'
  license:
    name: MIT
    url: https://spdx.org/licenses/MIT
  termsOfService: https://docs.github.com/articles/github-terms-of-service
  contact:
    name: Support
    url: https://support.github.com/contact?tags=dotcom-rest-api
  x-github-plan: ghes
  x-github-release: 3.9
servers:
- url: '{protocol}://{hostname}/api/v3'
  variables:
    hostname:
      description: Self-hosted Enterprise Server hostname
      default: HOSTNAME
    protocol:
      description: Self-hosted Enterprise Server protocol
      default: http
tags:
- name: Git
  description: Raw Git functionality.
paths:
  /repos/{owner}/{repo}/git/blobs:
    post:
      summary: GitHub Create a Blob
      description: ''
      tags:
      - Git
      operationId: git/create-blob
      externalDocs:
        description: API method documentation
        url: https://docs.github.com/enterprise-server@3.9/rest/git/blobs#create-a-blob
      parameters:
      - $ref: '#/components/parameters/owner'
      - $ref: '#/components/parameters/repo'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                content:
                  type: string
                  description: The new blob's content.
                encoding:
                  type: string
                  description: The encoding used for `content`. Currently, `"utf-8"` and `"base64"` are supported.
                  default: utf-8
              required:
              - content
            examples:
              default:
                value:
                  content: Content of the blob
                  encoding: utf-8
      responses:
        '201':
          description: Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/short-blob'
              examples:
                default:
                  $ref: '#/components/examples/short-blob'
          headers:
            Location:
              example: https://api.github.com/repos/octocat/example/git/blobs/3a0f86fb8db8eea7ccbb9a95f325ddbedfb25e15
              schema:
                type: string
        '403':
          $ref: '#/components/responses/forbidden'
        '404':
          $ref: '#/components/responses/not_found'
        '409':
          $ref: '#/components/responses/conflict'
        '422':
          $ref: '#/components/responses/validation_failed'
      x-github:
        githubCloudOnly: false
        enabledForGitHubApps: true
        category: git
        subcategory: blobs
      x-microcks-operation:
        delay: 0
        dispatcher: FALLBACK
  /repos/{owner}/{repo}/git/blobs/{file_sha}:
    get:
      summary: GitHub Get a Blob
      description: 'The `content` in the response will always be Base64 encoded.


        This endpoint supports the following custom media types. For more information, see "[Media types](https://docs.github.com/enterprise-server@3.9/rest/using-the-rest-api/getting-started-with-the-rest-api#media-types)."


        - **`application/vnd.github.raw+json`**: Returns the raw blob data.

        - **`application/vnd.github+json`**: Returns a JSON representation of the blob with `content` as a base64 encoded string. This is the default if no media type is specified.


        **Note** This endpoint supports blobs up to 100 megabytes in size.'
      tags:
      - Git
      operationId: git/get-blob
      externalDocs:
        description: API method documentation
        url: https://docs.github.com/enterprise-server@3.9/rest/git/blobs#get-a-blob
      parameters:
      - $ref: '#/components/parameters/owner'
      - $ref: '#/components/parameters/repo'
      - name: file_sha
        in: path
        required: true
        schema:
          type: string
        example: abc123def456789012345678901234567890
      responses:
        '200':
          description: Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/blob'
              examples:
                default:
                  $ref: '#/components/examples/blob'
        '403':
          $ref: '#/components/responses/forbidden'
        '404':
          $ref: '#/components/responses/not_found'
        '422':
          $ref: '#/components/responses/validation_failed'
      x-github:
        githubCloudOnly: false
        enabledForGitHubApps: true
        category: git
        subcategory: blobs
      x-microcks-operation:
        delay: 0
        dispatcher: FALLBACK
  /repos/{owner}/{repo}/git/commits:
    post:
      summary: GitHub Create a Commit
      description: 'Creates a new Git [commit object](https://git-scm.com/book/en/v2/Git-Internals-Git-Objects).


        **Signature verification object**


        The response will include a `verification` object that describes the result of verifying the commit''s signature. The following fields are included in the `verification` object:


        | Name | Type | Description |

        | - | - | -- |

        | `verified` | `boolean` | Indicates whether GitHub considers the signature in this commit to be verified. |

        | `reason` | `string` | The reason for verified value. Possible values and their meanings are enumerated in the table below. |

        | `signature` | `string` | The signature that was extracted from the commit. |

        | `payload` | `string` | The value that was signed. |


        These are the possible values for `reason` in the `verification` object:


        | Value | Description |

        | -- | -- |

        | `expired_key` | The key that made the signature is expired. |

        | `not_signing_key` | The "signing" flag is not among the usage flags in the GPG key that made the signature. |

        | `gpgverify_error` | There was an error communicating with the signature verification service. |

        | `gpgverify_unavailable` | The signature verification service is currently unavailable. |

        | `unsigned` | The object does not include a signature. |

        | `unknown_signature_type` | A non-PGP signature was found in the commit. |

        | `no_user` | No user was associated with the `committer` email address in the commit. |

        | `unverified_email` | The `committer` email address in the commit was associated with a user, but the email address is not verified on their account. |

        | `bad_email` | The `committer` email address in the commit is not included in the identities of the PGP key that made the signature. |

        | `unknown_key` | The key that made the signature has not been registered with any user''s account. |

        | `malformed_signature` | There was an error parsing the signature. |

        | `invalid` | The signature could not be cryptographically verified using the key whose key-id was found in the signature. |

        | `valid` | None of the above errors applied, so the signature is considered to be verified. |'
      tags:
      - Git
      operationId: git/create-commit
      externalDocs:
        description: API method documentation
        url: https://docs.github.com/enterprise-server@3.9/rest/git/commits#create-a-commit
      parameters:
      - $ref: '#/components/parameters/owner'
      - $ref: '#/components/parameters/repo'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                message:
                  type: string
                  description: The commit message
                tree:
                  type: string
                  description: The SHA of the tree object this commit points to
                parents:
                  type: array
                  description: The SHAs of the commits that were the parents of this commit. If omitted or empty, the commit will be written as a root commit. For a single parent, an array of one SHA should be provided; for a merge commit, an array of more than one should be provided.
                  items:
                    type: string
                author:
                  type: object
                  description: Information about the author of the commit. By default, the `author` will be the authenticated user and the current date. See the `author` and `committer` object below for details.
                  properties:
                    name:
                      type: string
                      description: The name of the author (or committer) of the commit
                    email:
                      type: string
                      description: The email of the author (or committer) of the commit
                    date:
                      type: string
                      format: date-time
                      description: 'Indicates when this commit was authored (or committed). This is a timestamp in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format: `YYYY-MM-DDTHH:MM:SSZ`.'
                  required:
                  - name
                  - email
                committer:
                  type: object
                  description: Information about the person who is making the commit. By default, `committer` will use the information set in `author`. See the `author` and `committer` object below for details.
                  properties:
                    name:
                      type: string
                      description: The name of the author (or committer) of the commit
                    email:
                      type: string
                      description: The email of the author (or committer) of the commit
                    date:
                      type: string
                      format: date-time
                      description: 'Indicates when this commit was authored (or committed). This is a timestamp in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format: `YYYY-MM-DDTHH:MM:SSZ`.'
                signature:
                  type: string
                  description: The [PGP signature](https://en.wikipedia.org/wiki/Pretty_Good_Privacy) of the commit. GitHub adds the signature to the `gpgsig` header of the created commit. For a commit signature to be verifiable by Git or GitHub, it must be an ASCII-armored detached PGP signature over the string commit as it would be written to the object database. To pass a `signature` parameter, you need to first manually create a valid PGP signature, which can be complicated. You may find it easier to [use the command line](https://git-scm.com/book/id/v2/Git-Tools-Signing-Your-Work) to create signed commits.
              required:
              - message
              - tree
            examples:
              default:
                value:
                  message: my commit message
                  author:
                    name: Mona Octocat
                    email: octocat@github.com
                    date: '2008-07-09T16:13:30+12:00'
                  parents:
                  - 7d1b31e74ee336d15cbd21741bc88a537ed063a0
                  tree: 827efc6d56897b048c772eb4087f854f46256132
                  signature: '--BEGIN PGP SIGNATURE--


                    iQIzBAABAQAdFiEESn/54jMNIrGSE6Tp6cQjvhfv7nAFAlnT71cACgkQ6cQjvhfv

                    7nCWwA//XVqBKWO0zF+bZl6pggvky3Oc2j1pNFuRWZ29LXpNuD5WUGXGG209B0hI

                    DkmcGk19ZKUTnEUJV2Xd0R7AW01S/YSub7OYcgBkI7qUE13FVHN5ln1KvH2all2n

                    2+JCV1HcJLEoTjqIFZSSu/sMdhkLQ9/NsmMAzpf/iIM0nQOyU4YRex9eD1bYj6nA

                    OQPIDdAuaTQj1gFPHYLzM4zJnCqGdRlg0sOM/zC5apBNzIwlgREatOYQSCfCKV7k

                    nrU34X8b9BzQaUx48Qa+Dmfn5KQ8dl27RNeWAqlkuWyv3pUauH9UeYW+KyuJeMkU

                    +NyHgAsWFaCFl23kCHThbLStMZOYEnGagrd0hnm1TPS4GJkV4wfYMwnI4KuSlHKB

                    jHl3Js9vNzEUQipQJbgCgTiWvRJoK3ENwBTMVkKHaqT4x9U4Jk/XZB6Q8MA09ezJ

                    3QgiTjTAGcum9E9QiJqMYdWQPWkaBIRRz5cET6HPB48YNXAAUsfmuYsGrnVLYbG+

                    UpC6I97VybYHTy2O9XSGoaLeMI9CsFn38ycAxxbWagk5mhclNTP5mezIq6wKSwmr

                    X11FW3n1J23fWZn5HJMBsRnUCgzqzX3871IqLYHqRJ/bpZ4h20RhTyPj5c/z7QXp

                    eSakNQMfbbMcljkha+ZMuVQX1K9aRlVqbmv3ZMWh+OijLYVU2bc=

                    =5Io4

                    --END PGP SIGNATURE--

                    '
      responses:
        '201':
          description: Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/git-commit'
              examples:
                default:
                  $ref: '#/components/examples/git-commit'
          headers:
            Location:
              example: https://api.github.com/repos/octocat/Hello-World/git/commits/7638417db6d59f3c431d3e1f261cc637155684cd
              schema:
                type: string
        '404':
          $ref: '#/components/responses/not_found'
        '422':
          $ref: '#/components/responses/validation_failed'
      x-github:
        githubCloudOnly: false
        enabledForGitHubApps: true
        category: git
        subcategory: commits
      x-microcks-operation:
        delay: 0
        dispatcher: FALLBACK
  /repos/{owner}/{repo}/git/commits/{commit_sha}:
    get:
      summary: GitHub Get a Commit Object
      description: 'Gets a Git [commit object](https://git-scm.com/book/en/v2/Git-Internals-Git-Objects).


        To get the contents of a commit, see "[Get a commit](/rest/commits/commits#get-a-commit)."


        **Signature verification object**


        The response will include a `verification` object that describes the result of verifying the commit''s signature. The following fields are included in the `verification` object:


        | Name | Type | Description |

        | - | - | -- |

        | `verified` | `boolean` | Indicates whether GitHub considers the signature in this commit to be verified. |

        | `reason` | `string` | The reason for verified value. Possible values and their meanings are enumerated in the table below. |

        | `signature` | `string` | The signature that was extracted from the commit. |

        | `payload` | `string` | The value that was signed. |


        These are the possible values for `reason` in the `verification` object:


        | Value | Description |

        | -- | -- |

        | `expired_key` | The key that made the signature is expired. |

        | `not_signing_key` | The "signing" flag is not among the usage flags in the GPG key that made the signature. |

        | `gpgverify_error` | There was an error communicating with the signature verification service. |

        | `gpgverify_unavailable` | The signature verification service is currently unavailable. |

        | `unsigned` | The object does not include a signature. |

        | `unknown_signature_type` | A non-PGP signature was found in the commit. |

        | `no_user` | No user was associated with the `committer` email address in the commit. |

        | `unverified_email` | The `committer` email address in the commit was associated with a user, but the email address is not verified on their account. |

        | `bad_email` | The `committer` email address in the commit is not included in the identities of the PGP key that made the signature. |

        | `unknown_key` | The key that made the signature has not been registered with any user''s account. |

        | `malformed_signature` | There was an error parsing the signature. |

        | `invalid` | The signature could not be cryptographically verified using the key whose key-id was found in the signature. |

        | `valid` | None of the above errors applied, so the signature is considered to be verified. |'
      tags:
      - Git
      operationId: git/get-commit
      externalDocs:
        description: API method documentation
        url: https://docs.github.com/enterprise-server@3.9/rest/git/commits#get-a-commit-object
      parameters:
      - $ref: '#/components/parameters/owner'
      - $ref: '#/components/parameters/repo'
      - $ref: '#/components/parameters/commit-sha'
      responses:
        '200':
          description: Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/git-commit'
              examples:
                default:
                  $ref: '#/components/examples/git-commit-2'
        '404':
          $ref: '#/components/responses/not_found'
      x-github:
        githubCloudOnly: false
        enabledForGitHubApps: true
        category: git
        subcategory: commits
      x-microcks-operation:
        delay: 0
        dispatcher: FALLBACK
  /repos/{owner}/{repo}/git/matching-refs/{ref}:
    get:
      summary: GitHub List Matching References
      description: 'Returns an array of references from your Git database that match the supplied name. The `:ref` in the URL must be formatted as `heads/<branch name>` for branches and `tags/<tag name>` for tags. If the `:ref` doesn''t exist in the repository, but existing refs start with `:ref`, they will be returned as an array.


        When you use this endpoint without providing a `:ref`, it will return an array of all the references from your Git database, including notes and stashes if they exist on the server. Anything in the namespace is returned, not just `heads` and `tags`.


        **Note:** You need to explicitly [request a pull request](https://docs.github.com/enterprise-server@3.9/rest/pulls/pulls#get-a-pull-request) to trigger a test merge commit, which checks the mergeability of pull requests. For more information, see "[Checking mergeability of pull requests](https://docs.github.com/enterprise-server@3.9/rest/guides/getting-started-with-the-git-database-api#checking-mergeability-of-pull-requests)".


        If you request matching references for a branch named `feature` but the branch `feature` doesn''t exist, the response can still include other matching head refs that start with the word `feature`, such as `featureA` and `featureB`.'
      tags:
      - Git
      operationId: git/list-matching-refs
      externalDocs:
        description: API method documentation
        url: https://docs.github.com/enterprise-server@3.9/rest/git/refs#list-matching-references
      parameters:
      - $ref: '#/components/parameters/owner'
      - $ref: '#/components/parameters/repo'
      - $ref: '#/components/parameters/git-ref-only'
      responses:
        '200':
          description: Response
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/git-ref'
              examples:
                default:
                  $ref: '#/components/examples/git-ref-items'
          headers:
            Link:
              $ref: '#/components/headers/link'
      x-github:
        githubCloudOnly: false
        enabledForGitHubApps: true
        category: git
        subcategory: refs
      x-microcks-operation:
        delay: 0
        dispatcher: FALLBACK
  /repos/{owner}/{repo}/git/ref/{ref}:
    get:
      summary: GitHub Get a Reference
      description: 'Returns a single reference from your Git database. The `:ref` in the URL must be formatted as `heads/<branch name>` for branches and `tags/<tag name>` for tags. If the `:ref` doesn''t match an existing ref, a `404` is returned.


        **Note:** You need to explicitly [request a pull request](https://docs.github.com/enterprise-server@3.9/rest/pulls/pulls#get-a-pull-request) to trigger a test merge commit, which checks the mergeability of pull requests. For more information, see "[Checking mergeability of pull requests](https://docs.github.com/enterprise-server@3.9/rest/guides/getting-started-with-the-git-database-api#checking-mergeability-of-pull-requests)".'
      tags:
      - Git
      operationId: git/get-ref
      externalDocs:
        description: API method documentation
        url: https://docs.github.com/enterprise-server@3.9/rest/git/refs#get-a-reference
      parameters:
      - $ref: '#/components/parameters/owner'
      - $ref: '#/components/parameters/repo'
      - $ref: '#/components/parameters/git-ref-only'
      responses:
        '200':
          description: Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/git-ref'
              examples:
                default:
                  $ref: '#/components/examples/git-ref'
        '404':
          $ref: '#/components/responses/not_found'
      x-github:
        githubCloudOnly: false
        enabledForGitHubApps: true
        category: git
        subcategory: refs
      x-microcks-operation:
        delay: 0
        dispatcher: FALLBACK
  /repos/{owner}/{repo}/git/refs:
    post:
      summary: GitHub Create a Reference
      description: Creates a reference for your repository. You are unable to create new references for empty repositories, even if the commit SHA-1 hash used exists. Empty repositories are repositories without branches.
      tags:
      - Git
      operationId: git/create-ref
      externalDocs:
        description: API method documentation
        url: https://docs.github.com/enterprise-server@3.9/rest/git/refs#create-a-reference
      parameters:
      - $ref: '#/components/parameters/owner'
      - $ref: '#/components/parameters/repo'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                ref:
                  type: string
                  description: 'The name of the fully qualified reference (ie: `refs/heads/master`). If it doesn''t start with ''refs'' and have at least two slashes, it will be rejected.'
                sha:
                  type: string
                  description: The SHA1 value for this reference.
              required:
              - ref
              - sha
            examples:
              default:
                value:
                  ref: refs/heads/featureA
                  sha: aa218f56b14c9653891f9e74264a383fa43fefbd
      responses:
        '201':
          description: Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/git-ref'
              examples:
                default:
                  $ref: '#/components/examples/git-ref'
          headers:
            Location:
              example: https://api.github.com/repos/octocat/Hello-World/git/refs/heads/featureA
              schema:
                type: string
        '422':
          $ref: '#/components/responses/validation_failed'
      x-github:
        githubCloudOnly: false
        enabledForGitHubApps: true
        category: git
        subcategory: refs
      x-microcks-operation:
        delay: 0
        dispatcher: FALLBACK
  /repos/{owner}/{repo}/git/refs/{ref}:
    patch:
      summary: GitHub Update a Reference
      description: Updates the provided reference to point to a new SHA. For more information, see "[Git References](https://git-scm.com/book/en/v2/Git-Internals-Git-References)" in the Git documentation.
      tags:
      - Git
      operationId: git/update-ref
      externalDocs:
        description: API method documentation
        url: https://docs.github.com/enterprise-server@3.9/rest/git/refs#update-a-reference
      parameters:
      - $ref: '#/components/parameters/owner'
      - $ref: '#/components/parameters/repo'
      - $ref: '#/components/parameters/git-ref-only'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                sha:
                  type: string
                  description: The SHA1 value to set this reference to
                force:
                  type: boolean
                  description: Indicates whether to force the update or to make sure the update is a fast-forward update. Leaving this out or setting it to `false` will make sure you're not overwriting work.
                  default: false
              required:
              - sha
            examples:
              default:
                value:
                  sha: aa218f56b14c9653891f9e74264a383fa43fefbd
                  force: true
      responses:
        '200':
          description: Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/git-ref'
              examples:
                default:
                  $ref: '#/components/examples/git-ref'
        '422':
          $ref: '#/components/responses/validation_failed'
      x-github:
        githubCloudOnly: false
        enabledForGitHubApps: true
        category: git
        subcategory: refs
      x-microcks-operation:
        delay: 0
        dispatcher: FALLBACK
    delete:
      summary: GitHub Delete a Reference
      description: Deletes the provided reference.
      tags:
      - Git
      operationId: git/delete-ref
      externalDocs:
        description: API method documentation
        url: https://docs.github.com/enterprise-server@3.9/rest/git/refs#delete-a-reference
      parameters:
      - $ref: '#/components/parameters/owner'
      - $ref: '#/components/parameters/repo'
      - $ref: '#/components/parameters/git-ref-only'
      responses:
        '204':
          description: Response
        '422':
          $ref: '#/components/responses/validation_failed'
      x-github:
        githubCloudOnly: false
        enabledForGitHubApps: true
        category: git
        subcategory: refs
      x-microcks-operation:
        delay: 0
        dispatcher: FALLBACK
  /repos/{owner}/{repo}/git/tags:
    post:
      summary: GitHub Create a Tag Object
      description: 'Note that creating a tag object does not create the reference that makes a tag in Git. If you want to create an annotated tag in Git, you have to do this call to create the tag object, and then [create](https://docs.github.com/enterprise-server@3.9/rest/git/refs#create-a-reference) the `refs/tags/[tag]` reference. If you want to create a lightweight tag, you only have to [create](https://docs.github.com/enterprise-server@3.9/rest/git/refs#create-a-reference) the tag reference - this call would be unnecessary.


        **Signature verification object**


        The response will include a `verification` object that describes the result of verifying the commit''s signature. The following fields are included in the `verification` object:


        | Name | Type | Description |

        | - | - | -- |

        | `verified` | `boolean` | Indicates whether GitHub considers the signature in this commit to be verified. |

        | `reason` | `string` | The reason for verified value. Possible values and their meanings are enumerated in table below. |

        | `signature` | `string` | The signature that was extracted from the commit. |

        | `payload` | `string` | The value that was signed. |


        These are the possible values for `reason` in the `verification` object:


        | Value | Description |

        | -- | -- |

        | `expired_key` | The key that made the signature is expired. |

        | `not_signing_key` | The "signing" flag is not among the usage flags in the GPG key that made the signature. |

        | `gpgverify_error` | There was an error communicating with the signature verification service. |

        | `gpgverify_unavailable` | The signature verification service is currently unavailable. |

        | `unsigned` | The object does not include a signature. |

        | `unknown_signature_type` | A non-PGP signature was found in the commit. |

        | `no_user` | No user was associated with the `committer` email address in the commit. |

        | `unverified_email` | The `committer` email address in the commit was associated with a user, but the email address is not verified on their account. |

        | `bad_email` | The `committer` email address in the commit is not included in the identities of the PGP key that made the signature. |

        | `unknown_key` | The key that made the signature has not been registered with any user''s account. |

        | `malformed_signature` | There was an error parsing the signature. |

        | `invalid` | The signature could not be cryptographically verified using the key whose key-id was found in the signature. |

        | `valid` | None of the above errors applied, so the signature is considered to be verified. |'
      tags:
      - Git
      operationId: git/create-tag
      externalDocs:
        description: API method documentation
        url: https://docs.github.com/enterprise-server@3.9/rest/git/tags#create-a-tag-object
      parameters:
      - $ref: '#/components/parameters/owner'
      - $ref: '#/components/parameters/repo'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                tag:
                  type: string
                  description: The tag's name. This is typically a version (e.g., "v0.0.1").
                message:
                  type: string
                  description: The tag message.
                object:
                  type: string
                  description: The SHA of the git object this is tagging.
                type:
                  type: string
                  description: The type of the object we're tagging. Normally this is a `commit` but it can also be a `tree` or a `blob`.
                  enum:
                  - commit
                  - tree
                  - blob
                tagger:
                  type: object
                  description: An object with information about the individual creating the tag.
                  properties:
                    name:
                      type: string
                      description: The name of the author of the tag
                    email:
                      type: string
                      description: The email of the author of the tag
                    date:
                      type: string
                      format: date-time
                      description: 'When this object was tagged. This is a timestamp in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format: `YYYY-MM-DDTHH:MM:SSZ`.'
                  required:
                  - name
                  - email
              required:
              - tag
              - message
              - object
              - type
            examples:
              default:
                value:
                  tag: v0.0.1
                  message: initial version
                  object: c3d0be41ecbe669545ee3e94d31ed9a4bc91ee3c
                  type: commit
                  tagger:
                    name: Monalisa Octocat
                    email: octocat@github.com
                    date: '2011-06-17T14:53:35-07:00'
      responses:
        '201':
          description: Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/git-tag'
              examples:
                default:
                  $ref: '#/components/examples/git-tag'
          headers:
            Location:
              example: https://api.github.com/repos/octocat/Hello-World/git/tags/940bd336248efae0f9ee5bc7b2d5c985887b16ac
              schema:
                type: string
        '422':
          $ref: '#/components/responses/validation_failed'
      x-github:
        githubCloudOnly: false
        enabledForGitHubApps: true
        category: git
        subcategory: tags
      x-microcks-operation:
        delay: 0
        dispatcher: FALLBACK
  /repos/{owner}/{repo}/git/tags/{tag_sha}:
    get:
      summary: GitHub Get a Tag
      description: '**Signature verification object**


        The response will include a `verification` object that describes the result of verifying the commit''s signature. The following fields are included in the `verification` object:


        | Name | Type | Description |

        | - | - | -- |

        | `verified` | `boolean` | Indicates whether GitHub considers the signature in this commit to be verified. |

        | `reason` | `string` | The reason for verified value. Possible values and their meanings are enumerated in table below. |

        

# --- truncated at 32 KB (722 KB total) ---
# Full source: https://raw.githubusercontent.com/api-evangelist/github/refs/heads/main/openapi/github-git-api-openapi.yml