Documentation › Set up (developers)
Open a site from a git repository
Clone a site from GitHub or any git host on the Sites screen; Galley uses your computer's own git sign-in.
Start here when the site lives on GitHub, GitLab, Bitbucket or your own git server, and isn't on this computer yet.
Link to this section: Clone it
- On the Sites screen, press Add sites, then Clone a site….
- In Site address, paste the address you'd give
git clone—https://…orgit@github.com:org/site.git. - Leave Which version (optional) empty to edit the version the site publishes from, or type a branch name.
- Press Clone site. A progress bar shows the download; the site opens when it's done.
The copy goes into the Galley home's sites/ folder (~/.galley/sites/), named after the repository.
Link to this section: Signing in to the git host
Galley has no git sign-in of its own. It runs git as you, so whatever lets git clone work in your terminal — a credential helper, the macOS keychain, an SSH agent, gh auth login — works here too. The same sign-in is used to push when you publish.
Link to this section: If something's different
- Already have the site on this computer? Use Add sites › Open one folder…, or run
galley <folder>in a terminal. - "That repository wasn't found." Check the address, and that you can see the repository. GitHub says the same for a private one you can't reach.
- "The code host didn't accept your sign-in for that repository." Sign in to the host on this computer (for example
gh auth login), then try again. - "That branch doesn't exist in the repository." Fix the name, or leave the field empty.
- "Couldn't reach the code host." Check the internet connection.
- The address is refused. Only
httpsand ssh addresses work — not local paths.
Galley doesn't install the site's dependencies when it clones; the preview does that the first time it starts. A hosted install doesn't clone like this: it looks after one site, connected at its first run with its own deploy key or an access token (Run a hosted install). The same over the API: POST /api/sites/clone (HTTP API).