---
updatedAt: 2026-10-20T11:40:22.000Z
agentTools:
  projectIndex: https://docs.y42.com/llms.txt
---

# Git Proxy

Git extra header needed with auth token while cloning.

<a target="_blank" href="https://api.dev.y42.dev/api/1/github-backend/docs#/proxy/post_api_1_github_backend_company__company_id__clone__space_id___sub_path_">(Internal reference)</a>

# OpenAPI definition

```json
{
  "openapi": "3.0.2",
  "info": {
    "title": "Y42 Public API",
    "version": "0.0.1"
  },
  "paths": {
    "/gateway/companies/{company_id}/spaces/{space_id}/git/{sub_path}": {
      "post": {
        "tags": [
          "Spaces"
        ],
        "summary": "Git Proxy",
        "operationId": "gateway_companies__company_id__spaces__space_id__git__sub_path__post",
        "responses": {
          "400": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "title": "BadRequestResponse",
                  "required": [
                    "error_message"
                  ],
                  "type": "object",
                  "properties": {
                    "error_message": {
                      "title": "Error Message",
                      "type": "string",
                      "example": "Invalid request"
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "title": "UnauthorizedResponse",
                  "required": [
                    "error_message"
                  ],
                  "type": "object",
                  "properties": {
                    "error_message": {
                      "title": "Error Message",
                      "type": "string",
                      "example": "Authorization error, token is not valid"
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "title": "NotFoundResponse",
                  "required": [
                    "error_message"
                  ],
                  "type": "object",
                  "properties": {
                    "error_message": {
                      "title": "Error Message",
                      "type": "string",
                      "example": "Provided space Id is invalid"
                    }
                  }
                }
              }
            }
          }
        },
        "description": "Git extra header needed with auth token while cloning.\n\n<a target=\"_blank\" href=\"https://api.dev.y42.dev/api/1/github-backend/docs#/proxy/post_api_1_github_backend_company__company_id__clone__space_id___sub_path_\">(Internal reference)</a>",
        "parameters": [
          {
            "name": "authorization",
            "in": "header",
            "required": true,
            "schema": {
              "example": "Bearer API_KEY",
              "title": "Authorization",
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "company_id",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "space_id",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "sub_path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ]
      }
    }
  },
  "x-readme": {
    "explorer-enabled": true,
    "proxy-enabled": true
  }
}
```