tl login opens a browser, authenticates your account, and stores a local CLI token. After that, tl git commands mint the short-lived credentials they need automatically.
For plain git in a worktree, run tl git setup once. See Set Up Plain Git. You only handle a Git credential yourself in CI or another HTTP client.
How Authentication Fits Together
There are two layers. SDKs and direct API clients use API keys; the CLI can use the same API key or the PAT stored bytl login:
Your CLI/API credential is not sent to Git. Tensorlake uses it to mint a Git credential, then Git clients and mounts use that Git credential against the repository service.
How Git Credentials Work
When a command needs repository access:- The CLI authenticates to Tensorlake with your local CLI token, API key, or PAT.
- Tensorlake checks the current project and authorized principal.
- Tensorlake mints a short-lived Git credential for that principal.
- The Git service verifies the credential’s signature, project, repo pattern, expiration, revocation status, and scopes on each request.
Most CLI paths mint a repo-scoped credential. That keeps clone, push, snapshot, and promotion operations narrow to the repository they are working on.
Mint a Git Credential
t. The password is the token.
Use It With Git
- Credential store
- Embed in URL
Cache the credential with Git’s credential helper:Git remembers the credential for later commands against the same remote.
Set Up Plain Git
tl git setup makes git fetch and git push in one worktree authenticate on their own. Run it once in the repository:
- Adds a remote named
tlthat points at the repository URL. If a remote already points there, for example theoriginleft bytl git clone, it reuses that remote. - Registers
tl git credential-helperin the repository’s local Git config, scoped to the Tensorlake Git host. Git runs the helper on each fetch and push. The helper mints a repo-scoped credential and caches it until it expires. - Runs
git ls-remoteagainst the remote to prove the setup works.
tl on its PATH. The helper line uses the bare name tl when it is on PATH, and the full path to the binary otherwise.
The helper is pinned to a context
The helper line in.git/config carries the context and organization that ran setup:
tl context use does not change which context Git uses. To move a repository to another context, run setup again in that context:
When the helper cannot authenticate
The helper never makes Git fail hard. It prints the reason on stderr, exits 0, and Git falls back to a password prompt. Press Ctrl-C, fix the cause, and retry.
To stop Git from prompting in scripts, set
GIT_TERMINAL_PROMPT=0. Git then fails with an authentication error instead.
Scopes
Every credential carries one or more scopes:tl git token <repo> mints git:read and git:write for that repository only. It is enough to clone, push, snapshot, and promote. It cannot create, delete, or list other repositories.
Repo-scoped credentials cannot create repositories, delete repositories, manage keys, or revoke tokens.
Token Lifetime
Git credentials are short-lived by design. The default lifetime is one hour. When a token expires, mint a new one:tl git mounts handle this automatically. The CLI caches fresh Git credentials for later commands and a running mount daemon rotates its credential before expiry.
For the full plain Git workflow, see Use with Git.
Git Repositories
Mint a credential, clone, branch, commit, merge, and push.
Platform Authentication
API keys, personal access tokens, SSO, and broader Tensorlake API authentication.