Docs menu

A git repo

Publish straight from a git repository on GitHub, GitLab or any other git service: Secretbase fetches it itself.

Publish a repository

$ cd ~
$ secretbase publish https://github.com/<you>/my-site

It fetches the default branch, builds it and ends with Live at <address>, as a folder does. The app is named after the repository; --name <name> gives it another name. --ref <branch or tag> publishes another branch or tag:

$ secretbase publish https://github.com/<you>/my-site --ref main

Publish the link again to put its newest commit online. After the first publish, new commits go online by themselves: see Deploy on push.

On the dashboard, From a git link next to the drop zone does the same.

A private repository

A private repository needs an access token from your git service (on GitHub, a fine-grained token that can only read that repository's contents). It belongs to one app. Add it, paste the token when it asks, and publish again:

$ secretbase git-token add github.com --app my-site
$ secretbase git-token list

The token is asked for and never goes on the command line. secretbase git-token remove --app my-site removes it. On the dashboard: the app's Settings, Git token for this app.

Good to know

  • Only https:// links work, with no password or token in the link.
  • Submodules aren't fetched, and Git LFS files arrive as their small pointer files.
  • A repository may hold up to 20,000 files and 2 GB; a fetch stops after 10 minutes.

If something goes wrong

  • "Secretbase couldn't read this repository: it doesn't exist, or it's private.": check the link, or add a git token (above).
  • "This repository has no branch or tag named <ref>.": check --ref.
  • "The access token for <host> was refused.": add a new one with secretbase git-token add.
  • "This link redirects somewhere else. Use the repository's current link."