Git
Git over HTTPS and SSH
Clone, fetch and push with the Git you already have. Partial and shallow clones, SSH keys, and the limits of each push.
HTTPS#
git clone https://api.yonedarepo.com/git/<repo-id>.git- Credentials. Any user name, and a token as the password: a personal access token (
ypat_) or a repository token (yrp_). Git asks after the server's401; a credential helper remembers the answer. A bearer token in anAuthorizationheader works too. - Access. Fetching needs read; pushing needs write, and pushing to a protected branch (
main,release,release/*) also needs land. - Public repositories clone and fetch with no credentials at all.
- Path-restricted tokens cannot use Git: Git reads and writes the whole repository. Use the API or a token without paths.
Partial and shallow clones#
Fetches speak Git's protocol v2, which Git uses by default since 2.26.
git clone --filter=blob:none https://api.yonedarepo.com/git/<repo-id>.git # files on demand
git clone --depth 1 https://api.yonedarepo.com/git/<repo-id>.git # latest commit only
git fetch --deepen 50
git fetch --unshallow--filter=blob:noneis the one partial-clone filter served; others are refused withuse --filter=blob:none.--depth,--deepenand--unshallowwork;--shallow-sinceand--shallow-excludeare refused withuse --depth or --deepen.- Protocol v0 (
git -c protocol.version=0) serves full clones only.
SSH#
Git over SSH reaches the platform through our SSH gateway. Two commands set up a machine; neither needs admin rights.
1. Install the CLI#
It installs the required SSH transport helper, unless a working one is already installed. On macOS or Linux:
curl -fsSL https://yonedarepo.com/install.sh | shOn Windows, in PowerShell:
irm https://yonedarepo.com/install.ps1 | iex2. Run the setup#
Sign in with yoneda login (the approval page ticks SSH keys for you; keep it, and leave the repositories at all), then:
yoneda ssh setupIt uses ~/.ssh/id_ed25519 or generates one, adds the public key to your account, writes a marked # yoneda begin block to ~/.ssh/config without touching your other entries, and copies the public key to the clipboard if it can. It then tries ssh -T, which accepts the host key on first use as you would at the prompt, and prints a git clone line. Run it again whenever you like: it changes only what is out of date.
3. Clone#
git clone ssh://git@ssh.yonedarepo.com/<repo-id>.gitssh -T git@ssh.yonedarepo.com answers Hi <account>! You've successfully authenticated, but YonedaRepo does not provide shell access.
Keys#
- Keys: Ed25519, ECDSA (P-256, P-384, P-521) and RSA of 2048 to 16384 bits. Security-key (
sk-) keys are not accepted. - An account holds up to 50 keys. An SSH key acts as its account: it fetches what the account reads and pushes where it writes.
- Removing a key stops it on the next request.
Limits#
These apply to HTTPS and SSH alike. Pushes through the yoneda:: helper are uploaded commit by commit and are not bound by the pack limit.
| Limit | Value |
|---|---|
| Pack data per push | 64 MiB |
| Objects per push | 40,000 |
| Size of one object | 100 MiB (use Git LFS for larger files) |
| Object bytes per push | 2 GiB |
| Push options per push | 64 |
A file over 50 MB is accepted with a warning suggesting Git LFS. Every limit, and how large a repository can grow, is on Limits.
What a push accepts#
- Branches and tags only (
refs/heads/*,refs/tags/*). Other refs are refused. - Annotated and lightweight tags. Tags never move and are never deleted once created.
--atomicmoves all the pushed working branches and tags, or none. A protected branch cannot be part of an atomic push: it moves only by landing.- Push options.
-o yoneda.reads=<path>,…declares the files a session read (see Declared reads); otheryoneda.*options are refused, and options without that prefix are ignored. - Not accepted: shallow pushes (from a shallow clone) and signed pushes (
--signed).
How a push to main lands next to other writers is on Concurrent pushes.
Troubleshooting#
| Message | Meaning |
|---|---|
Push exceeds 64 MiB of pack data | Push fewer commits at a time, or push through the yoneda:: helper |
Push has an object of N MiB; the limit is 100 MiB per file | Track the file with Git LFS |
REPO_SIZE_LIMIT or REPO_FULL | The repository reached a limit: start a new repository or contact support |
secret detected in <path>:<line> | A file holds a credential; see Security |
Not a Git repository URL: use /git/<repository id>.git | The URL needs the repository's id, not its name |
ssh: Could not resolve hostname or a hang on connect | Run yoneda ssh setup to install the required helper and repair the SSH configuration |