Clone and push with Git
GitCafe repositories work with any Git client over HTTPS or SSH. Copy a
repository's address from its Code button: the HTTPS tab gives
https://git.cafe/<owner>/<repo> and the SSH tab gives
git.cafe:<owner>/<repo>. The .git suffix is optional.
Public repositories can be cloned without signing in. Pushing, and cloning private repositories, needs credentials.
Use HTTPS with the CLI
The simplest way to authenticate is the cafe CLI:
| 1 | cafe auth login |
| 2 | cafe auth http setup |
| 3 | git clone https://git.cafe/<owner>/<repo> |
cafe auth http setup registers cafe as Git's credential helper for
GitCafe, so Git uses your CLI login. cafe auth http status shows whether it
is configured.
Use HTTPS with a token
On machines without the CLI, such as CI jobs, create a personal access token from the CI read-only or Push code template. When Git asks for credentials, enter your GitCafe handle as the username and the token as the password.
Use SSH
Add your public key in Settings → SSH Keys with Authentication usage, and choose what it may access. See SSH keys.
Clone with the SSH address:
1 git clone git.cafe:<owner>/<repo>
cafe auth ssh setup can find and register your key for you.
Use Git LFS
Repositories support Git LFS for large files. Install Git LFS, track the file types you need, and push as usual; the same HTTPS credentials are used.
| 1 | git lfs install |
| 2 | git lfs track "*.psd" |
| 3 | git add .gitattributes |
Download a snapshot
To get the files without Git history, choose Download tar.gz under the
Code button, or run cafe repo archive branch main > main.tar.gz.
If a push is rejected
- Permission denied: you need write access to the repository, and your token or SSH key must grant it.
- Protected branch: a ruleset may require a pull request or block force pushes. Push to a new branch and open a pull request.