Authenticating git operations
Every circuit on QubitHub is a real git repository. You can clone it, commit to it, and push back with the git you already have installed. No QubitHub tooling is required.
Reading a public circuit needs no credentials. Writing does, and the credential is not your website password.
The one rule
Section titled “The one rule”When git prompts you for credentials:
- Password: a QubitHub API key (or a JWT access token).
- Username: ignored. Type anything, or leave it blank.
This is the same shape as a GitHub personal access token. Your login password
will never work, and the error you get if you try it (Authentication failed)
does not say why.
Create a key
Section titled “Create a key”- Go to Dashboard → API Keys.
- Create new key, give it a name (
laptop,ci), keep the default scopes. - Copy the key. It starts with
qh_and is shown once.
You do not need an organisation. Personal keys work for every circuit you own.
Clone and push
Section titled “Clone and push”# Public circuit — no credentials neededgit clone https://qubithub.co/your-username/bell-state.gitcd bell-state
# Make a changegit add .git commit -m "tune the ansatz"
# Push — git prompts for credentialsgit push# Username for 'https://qubithub.co': anything# Password for 'https://[email protected]': qh_your_api_key_hereSkip the prompt
Section titled “Skip the prompt”Store the key in git’s credential helper once:
git config --global credential.helper osxkeychain # macOSgit config --global credential.helper libsecret # Linuxgit config --global credential.helper manager # WindowsThe next successful push saves the key; later pushes stop asking.
What each failure means
Section titled “What each failure means”| What git prints | Status | Meaning |
|---|---|---|
fatal: Authentication failed for '...' | 401 | The password was not a valid key or token: most often a truncated paste, or an expired or revoked key. |
fatal: unable to access '...': The requested URL returned error: 403 | 403 | The credential is valid, but that account cannot write to this circuit. |
fatal: repository '...' not found | 404 | The circuit does not exist, or the key is the wrong tier for it: a personal key against an organisation circuit, or an organisation key against a personal one. Both look identical on purpose. |
If git keeps re-prompting, your credential helper is replaying a stale key.
Delete the saved entry for qubithub.co (Keychain Access on macOS, Credential
Manager on Windows, secret-tool on Linux) and paste a fresh one.
CI and automation
Section titled “CI and automation”git clone https://x-access-token:${QUBITHUB_API_KEY}@qubithub.co/you/circuit.gitSet QUBITHUB_API_KEY from your CI provider’s secret store. Give the key an
expiry (the creation form accepts up to 365 days) and revoke it from the
dashboard when the pipeline retires.
Related
Section titled “Related”- Authentication: JWT and API keys for the REST API
- CLI / SDK Quickstart:
qubithub login,qubithub clone