-
Notifications
You must be signed in to change notification settings - Fork 1
Git Integration
siamakerlab edited this page May 23, 2026
·
3 revisions
For cloning private repositories into new projects (v0.9.0+).
/settings/git-integrations in the web UI.
-
No credentials —
https://github.com/owner/public-repo.gitworks out of the box for public repos. -
HTTPS PAT (Personal Access Token) — for private HTTPS URLs.
Registered per-host; the git CLI auto-picks via
credential.helper=store. -
SSH key — for private SSH URLs (
git@host:owner/repo.git). vibe-coder generates an ed25519 key pair; you register the public key in your git provider.
| File | Purpose | Permissions |
|---|---|---|
~/.config/vibe-coder/git-tokens.json |
Vibe-coder's normalized PAT store (UI reads from here) | 0600 |
~/.git-credentials |
Standard git CLI store. URLs of the form https://x-access-token:TOKEN@host
|
0600 |
~/.ssh/id_ed25519 + .pub
|
SSH key pair | 0600 / 0644 |
~/.ssh/known_hosts |
Pre-seeded with github.com / gitlab.com / bitbucket.org host keys |
0600 |
All paths are bind-mounted to ./vibe-coder-data/ so they survive image
upgrades.
-
/settings/git-integrations→ + New token (auto-open on first visit). - Pick provider (GitHub / GitLab / Gitea / Bitbucket / generic).
- Host: domain only (
github.com, nothttps://github.com). - Paste the token. Username auto-defaults per provider:
- GitHub:
x-access-token - GitLab:
oauth2 - Bitbucket:
x-token-auth - Gitea:
vibe-coder(host doesn't care, only token matters)
- GitHub:
- Click Register.
curl -X POST http://<host>:17880/api/settings/git-integrations \
-H "Authorization: Bearer $TOKEN" -H 'Content-Type: application/json' \
-d '{
"provider":"github",
"host":"github.com",
"token":"ghp_..."
}'| Provider | URL | Required scope |
|---|---|---|
| GitHub |
https://github.com/settings/tokens (classic) or fine-grained |
repo (classic) or "Contents: Read and write" (fine-grained) |
| GitLab | https://gitlab.com/-/user_settings/personal_access_tokens |
read_repository (and write_repository if you'll push) |
| Gitea | User Settings → Applications → Generate New Token | read:repository |
| Bitbucket | Personal settings → App passwords | Repository: Read (and Write if push) |
-
/settings/git-integrations→ SSH key section. - If no key exists, click Generate SSH key — server runs
ssh-keygen -t ed25519. - Copy the public key (button → clipboard).
- Paste it into your provider's SSH keys page.
- Now
git@host:owner/repoURLs work in project register.
curl -X POST http://<host>:17880/api/settings/git-integrations/ssh-keygen \
-H "Authorization: Bearer $TOKEN"
# Returns the full state including sshPublicKey# HTTPS (PAT auto-picked from ~/.git-credentials)
curl -X POST http://<host>:17880/api/projects/register \
-H "Authorization: Bearer $TOKEN" -H 'Content-Type: application/json' \
-d '{
"projectId":"my-private",
"appName":"My Private",
"packageName":"com.example.priv",
"sourceType":"clone",
"cloneUrl":"https://github.com/owner/private-repo.git"
}'
# SSH
curl -X POST http://<host>:17880/api/projects/register \
... -d '{ ..., "cloneUrl":"git@github.com:owner/private-repo.git" }'The server runs git clone --progress with:
-
GIT_TERMINAL_PROMPT=0(so an unauthenticated request fails fast instead of hanging on stdin) -
GIT_SSH_COMMAND="ssh -o StrictHostKeyChecking=accept-new -o BatchMode=yes"(auto-accepts new host keys, never prompts)
If clone fails, the partial directory is automatically cleaned up.
| Code | Cause | Fix |
|---|---|---|
400 missing_clone_url
|
sourceType=clone but cloneUrl empty | Provide cloneUrl |
400 bad_url_scheme
|
URL not https:// or git@host: | Use a supported scheme |
400 unsafe_url
|
URL contains file:// or ..
|
Don't try to clone local paths |
409 target_not_empty
|
Project folder already has files | Pick a different projectId |
502 clone_failed (exit 128) |
Authentication failed | Register a PAT or SSH key; check cloneUrl typos |
504 timeout
|
clone exceeded 10 min | Slow network or huge repo; clone manually inside the container with --depth=1
|
- PATs are stored in plaintext (0600 file). vibe-coder is a single-user LAN tool; OS file permissions are the boundary.
- Tokens are masked in any UI response (last 4 chars + bullets).
- Revoking a token: delete from the UI/API → the underlying
~/.git-credentialsis rewritten without that entry. - Best practice: use short-lived fine-grained PATs scoped to specific repos; rotate quarterly.