> ## Documentation Index
> Fetch the complete documentation index at: https://docs.phala.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Sync keys from GitHub

> Imports SSH keys from linked GitHub account. Adds new keys, updates existing, removes deleted.



## OpenAPI

````yaml /openapi.json post /api/v1/user/ssh-keys/github-sync
openapi: 3.1.0
info:
  title: Phala Cloud API
  version: 0.1.0
servers:
  - url: https://cloud-api.phala.com
security: []
tags:
  - name: CVMs
    description: Confidential Virtual Machine (CVM) lifecycle management on Phala Network
  - name: Apps
    description: App template management and CVM deployment from app blueprints
  - name: Webhooks
    description: Manage webhook endpoints and monitor delivery history
  - name: SSH Keys
    description: SSH public key management for CVM access
  - name: KMS
    description: >-
      Key Management Service — key derivation, on-chain anchoring, and
      inspection
  - name: Instance Types
    description: Available hardware configurations for CVM deployment
  - name: Attestations
    description: Remote attestation and TEE verification endpoints
paths:
  /api/v1/user/ssh-keys/github-sync:
    post:
      tags:
        - SSH Keys
      summary: Sync keys from GitHub
      description: >-
        Imports SSH keys from linked GitHub account. Adds new keys, updates
        existing, removes deleted.
      operationId: sync_github_ssh_keys_api_v1_user_ssh_keys_github_sync_post
      responses:
        '200':
          description: Sync completed
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GithubSyncResponse'
        '400':
          description: GitHub not linked or authorization revoked
        '401':
          description: Not authenticated
components:
  schemas:
    GithubSyncResponse:
      properties:
        synced_count:
          type: integer
          title: Synced Count
          description: Total keys synced from GitHub
        keys_added:
          type: integer
          title: Keys Added
          description: New keys added
        keys_updated:
          type: integer
          title: Keys Updated
          description: Existing keys updated
        keys_removed:
          type: integer
          title: Keys Removed
          description: Stale keys removed
        errors:
          items:
            type: string
          type: array
          title: Errors
          description: Sync errors encountered
      type: object
      required:
        - synced_count
        - keys_added
        - keys_updated
        - keys_removed
      title: GithubSyncResponse
      description: Result of GitHub SSH key sync operation.

````