> ## 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.

# Import keys from GitHub profile

> Fetches public SSH keys from any GitHub user's profile via the unauthenticated GitHub API. Deduplicates against the user's existing keys by fingerprint.



## OpenAPI

````yaml /openapi.json post /api/v1/user/ssh-keys/github-profile
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-profile:
    post:
      tags:
        - SSH Keys
      summary: Import keys from GitHub profile
      description: >-
        Fetches public SSH keys from any GitHub user's profile via the
        unauthenticated GitHub API. Deduplicates against the user's existing
        keys by fingerprint.
      operationId: import_github_profile_ssh_keys_api_v1_user_ssh_keys_github_profile_post
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/GithubProfileImportRequest'
        required: true
      responses:
        '200':
          description: Import completed; check keys_added and errors for per-key results
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GithubProfileImportResponse'
        '400':
          description: GitHub user not found, API request timed out, or network error
        '401':
          description: Not authenticated
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
components:
  schemas:
    GithubProfileImportRequest:
      properties:
        github_username:
          type: string
          maxLength: 39
          minLength: 1
          title: Github Username
          description: GitHub username to import SSH keys from
      type: object
      required:
        - github_username
      title: GithubProfileImportRequest
      description: Request model for importing SSH keys from a GitHub profile.
    GithubProfileImportResponse:
      properties:
        github_username:
          type: string
          title: Github Username
          description: GitHub username that was imported
        keys_added:
          type: integer
          title: Keys Added
          description: New keys added
        keys_skipped:
          type: integer
          title: Keys Skipped
          description: Keys skipped (already exist by fingerprint)
        errors:
          items:
            type: string
          type: array
          title: Errors
          description: Per-key errors encountered
      type: object
      required:
        - github_username
        - keys_added
        - keys_skipped
      title: GithubProfileImportResponse
      description: Result of importing SSH keys from a GitHub profile.
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    ValidationError:
      properties:
        loc:
          items:
            anyOf:
              - type: string
              - type: integer
          type: array
          title: Location
        msg:
          type: string
          title: Message
        type:
          type: string
          title: Error Type
      type: object
      required:
        - loc
        - msg
        - type
      title: ValidationError

````