Conversation
Adds an Authentication section documenting the one-token flow: use a N0 Personal Access Token (Bearer) for all n0 API calls, and mint the Gitea token via POST /workspaces/<id>/gitea/token/ instead of web UI, admin SSH, or email/password login. Enforces HTTPS git remotes and forbids SSH so the skill runs inside the Claude Desktop / Claude Code sandbox. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
…ll-URL imports, runner caveats
- Warn that redeploys don't repull an unchanged :latest tag (k3s containerd
tag cache); document the commit-SHA pin + re-import + redeploy flow
- Prefer full Gitea URL for definition imports: short org/repo form can fail
with a misleading 'No n0-app.json found' (seen on prod app.nzero.pro)
- Mark the 'Import into k3s' CI step as conditional: containerized runners
have no k3s binary and fail with exit 127
- Add troubleshooting rows: stale-version-after-redeploy, short-form import
error, and Actions runs misreported as failed after the job succeeded
- Document minting a Gitea token via POST /workspaces/{ws}/gitea/token/
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This was referenced Jul 4, 2026
There was a problem hiding this comment.
Pull request overview
Rebases and consolidates prior documentation updates onto the rewritten main, standardizing the N0 deploy guidance around a single PAT (Bearer) auth flow, HTTPS-only Gitea interactions, and more reliable redeploy/versioning practices in k3s-based environments.
Changes:
- Added an “Authentication (single token, HTTPS-only)” section centered on
$N0_API_BASE+$N0_API_TOKEN, including minting a Gitea token via the n0 API. - Updated deploy/import/redeploy examples to use the PAT Bearer token flow and expanded redeploy guidance (including
:latestcaching caveats and commit-SHA pinning). - Clarified CI runner caveats around
k3s ctr images importand expanded troubleshooting notes.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Comment on lines
+73
to
+77
| **You only need ONE credential: a N0 Personal Access Token (PAT).** Everything — | ||
| n0 API calls, workspace lookup, Gitea repo creation, git push, Supabase — is done | ||
| over **HTTPS** with this single token. This is the path that works inside the | ||
| Claude Desktop / Claude Code sandbox (outbound HTTPS only, no SSH, no interactive | ||
| web login, no server SSH). |
| curl -s -X POST "$N0_API_BASE/workspaces/${WS_ID}/apps/definitions/" \ | ||
| -H "Authorization: Bearer $N0_API_TOKEN" \ | ||
| -H "Content-Type: application/json" \ | ||
| -d '{"repo_url": "clovrlabs/my-app"}' |
Comment on lines
1860
to
1862
| git init && git add -A && git commit -m "Initial commit" | ||
| git remote add origin "https://<username>:${GITEA_TOKEN}@${GITEA_HOST}/clovrlabs/my-app.git" | ||
| git remote add origin "https://${GITEA_USER}:${GITEA_TOKEN}@${GITEA_HOST}/clovrlabs/my-app.git" | ||
| git push -u origin main --force |
Comment on lines
+1901
to
1902
| # Visit the app (host matches your platform domain, e.g. apps.nzero.pro) | ||
| open "https://my-app.apps.privateprompt.tech" |
| curl -s -X POST "$N0_API_BASE/workspaces/$WS_ID/apps/definitions/" \ | ||
| -H "Authorization: Bearer $N0_API_TOKEN" \ | ||
| -H "Content-Type: application/json" \ | ||
| -d '{"repo_url": "clovrlabs/my-app"}' |
| @@ -1597,19 +1648,14 @@ After generating the manifest and pushing code to Gitea, the app must be **impor | |||
|
|
|||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
gitea/token/endpoint, sandbox rules, no SSH/web-UI token creation) onto the rewritten main:lateston redeploy + commit-SHA pinning flow, full-URL definition imports, containerized-runner k3s caveats, troubleshooting rows) onto the rewritten main$N0_API_BASE/$N0_API_TOKEN, kept the HTTPS-only Gitea token guidance (dropped PR Field notes from a real deploy: stale :latest redeploys, full-URL imports, runner caveats #2's web-UI/SSH alternatives which contradict it), kept both the:latestwarning and the Deploy Versioning & Rollback sectionMain was squashed to a new root in #3, so the original branches share no ancestor and can't merge directly. Supersedes #1 and #2.
🤖 Generated with Claude Code