Guides · devtools · Popular APIs

GitHub private repository (from an existing local project)

Create a private repository under your account or organisation and push the current project with the GitHub CLI.

Verified live 24 October 2026Last researched 24 October 2026 · GitHub · provider site

Who owns what

  • GitHub account personal owned by the person
  • GitHub organisation organisationoptional · under GitHub accountOptional; the repo can live under the personal account instead.

Have ready

  • GitHub CLI (gh) installed and a local git repository with at least one commit

Steps

Steps marked “human step” are ones only you can do: verapli never signs in, submits, pays or accepts terms for you.

  1. Sign in with the GitHub CLI

    Run `gh auth login` and sign in in the browser yourself.

    • Guided by hand
    • Human step: You sign in
  2. Make sure gh uses the right account

    If you have more than one gh account, check `gh auth status` and switch to the account that owns the target organisation (`gh auth switch`), or pass that account's token, before creating the repo.

    • Guided by hand
    • After: Sign in with the GitHub CLI
    If something goes wrong (1)
    • The repo is created under the wrong account, or creation is refused for the organisation: Switch gh to the account with access to the organisation (gh auth switch) and retry. [1]
  3. Create the private repo and push

    From the project folder run `gh repo create <owner>/<name> --private --source . --push`. This creates the private repository, adds it as the origin remote and pushes the current branch.

    • Official API
    • Human step: You press submit
    • After: Make sure gh uses the right account

For agents

The same entry as JSON: /api/v1/entries/github/private-repo · requirements /api/v1/requirements/github/private-repo · terms /api/v1/terms/github/private-repo.

Remote MCP (read-only, no auth)
claude mcp add --transport http verapli https://verapli.com/mcp

> "What do I need for GitHub private repository (from an existing local project), and how long will it take?"
  → tools/call requirements { "provider_id": "github/private-repo" }

Sources

  1. verapli owner's live repository setup with gh (first-hand) gh repo create --private --source . --push works; with several gh accounts the right account's token must be used · accessed 24 October 2026 · first-hand

Provider rules change. This page is generated from verapli registry version 2026.1025.387; spotted something out of date? Tell us. GitHub is not affiliated with verapli.