Source control guide

Work with Git repositories.

Create or import an organization-owned repository, connect a local Git client over HTTPS, and manage its credentials and lifecycle without blurring project ownership.

Git smart HTTPGit LFSPrivate by default
Start hereOrganization › Projects › project › Code
Write permissionProject-scoped Manage source
Successful resultAn Active repository with a working HTTPS clone
01 / Before you begin

Choose the project and the access you need.

Prerequisites

  • A verified Mozaic account and membership in the organization.
  • An existing project to own the repository. Mozaic does not create personal repositories outside an organization.
  • The Manage source claim at the project or organization scope to create, import, fork, edit, push, archive, reactivate, or delete.
  • Git installed locally for clone, fetch, and push. Git LFS is optional and uses the same repository URL and separately scoped token permissions.

Any project member can browse an Active or Archived repository. A signed-in non-member can read only a repository whose organization, project, and repository have all been explicitly published.

02 / Create

Create an empty repository.

OrganizationProjectsprojectCodeRepository
  1. Open Code.Select the organization and project that will own the repository, then choose Repository.
  2. Name the repository.Enter a display name and review the generated slug. The slug becomes part of the browser and HTTPS Git URL.
  3. Add a description.The rich-text description is optional and can be revised later from repository Settings › General.
  4. Create it.Mozaic reserves the identity, provisions Git storage, and then moves the repository to Active. Creation always requests private visibility.

Success state

The repository appears in Code with lifecycle Active, default branch refs/heads/main, Git object format sha1, and reftable reference storage. You can open Files, Commits, Compare, Pull requests, or Settings.

Names contain 1-180 characters. A new repository slug contains lowercase letters, digits, and hyphens, beginning with a letter or digit. Bundle-import slugs may also contain underscores. The server limit is 100 characters. Descriptions are limited to 16 KiB.

03 / Local Git

Clone, fetch, and push over HTTPS.

CoderepositoryClone

The Clone dialog displays the authoritative URL. Its shape is:

Terminalreplace the organization and repository slugs
git clone https://<organization-slug>.mozaic.space/git/<organization-slug>/<repository-slug>.git

# Connect an existing local repository
git remote add origin https://<organization-slug>.mozaic.space/git/<organization-slug>/<repository-slug>.git
git branch -M main
git push -u origin main
  1. Issue a credential.For a private clone, select Git read. For push, select Git write as well; Mozaic automatically includes the matching read permission.
  2. Authenticate.When Git prompts, use git as the username and the show-once mz_repo_... token as the password.
  3. Verify the remote.Run git remote -v and then fetch or push. Do not put the token into the remote URL, a shell history entry, or a committed Git configuration file.
Transport available today

Mozaic supports Git smart HTTP and Git LFS over HTTPS. SSH Git transport is not part of the current product path.

04 / Import

Import a verified Git bundle.

OrganizationProjectsprojectCodeImport bundle

Import is a one-time transfer, not an ongoing mirror. Produce a bundle locally, then upload it through the Source, Details, and Review steps.

Terminalfrom the source repository
git bundle create repository.bundle --all
git bundle verify repository.bundle
  1. Select the bundle.The file must be a valid Git bundle and must contain refs/heads/main.
  2. Enter repository details.Provide the name, slug, and optional description. Imported repositories also start private.
  3. Review and import.Mozaic streams the upload into quarantine, verifies it, and finalizes it atomically. Do not navigate away while the transfer is in progress.

Success state

The repository changes from Provisioning to Active and the imported branches, tags, and history are available. If validation fails, the lifecycle is Provisioning failed; no partially imported repository becomes writable.

05 / Browser workspace

Browse history and make bounded edits.

CoderepositoryFiles / Commits / Compare
Files
Browse a selected revision, open UTF-8 source, inspect directories, history and blame, and use browser editing when the repository is Active and you hold Manage source.
Commits
Select a full branch or tag reference, page through its history, and inspect commit signature evidence.
Compare
Choose exact base and head references. The result records the resolved revisions and displays the textual patch.
Pull requests
Open or review a proposal whose source, target, and merge base are pinned into an immutable snapshot.

Browser edits compare the expected revision before updating a ref. If another writer moves the branch first, reload the latest revision and reapply the change instead of overwriting it.

06 / Fork

Fork into an explicit organization and project.

CoderepositoryFork
  1. Choose the target.Select an organization and project where you have Manage source. There is no hidden personal fork namespace.
  2. Review repository details.Mozaic suggests a fork name and slug. Change them if the target project already uses that slug.
  3. Confirm the source relationship.The Review step names the source repository, target owner, slug, and initial private access.
  4. Create the fork.Wait for the new repository to become Active, create a branch, push your change, and then open a pull request against the original repository.

Forking is also the supported contribution path from a public repository: authenticate, place the fork in an organization you control, and keep ownership visible throughout review.

07 / Credentials

Issue the least privilege required.

CoderepositorySettingsCredentials

Credential creation requires a fresh authentication window. A member can issue read-only credentials for their own use. A credential containing either write scope additionally requires Manage source.

git_read
Clone and fetch Git objects.
git_write
Push Git refs. This scope is valid only together with git_read.
lfs_read
Download Git LFS objects.
lfs_write
Upload LFS objects and create or release LFS locks. This scope is valid only with lfs_read.
  1. Name the client.Use a recognizable name such as Work laptop or Release workstation.
  2. Choose scopes and expiry.The default is 90 days. The accepted range is 1-365 days.
  3. Copy the token immediately.The raw secret is returned once. Mozaic stores its digest, not a retrievable copy.
  4. Revoke unused credentials.The list shows active, expired, and revoked credentials plus last-use time when available.
Per-user limit

Each user can have at most 32 active credentials for one repository. Revoke an old credential before issuing another when the limit is reached.

08 / Lifecycle and public access

Archive before you delete.

CoderepositorySettingsLifecycle
Active
Readable and writable, subject to credentials, claims, and branch policy.
Archived
Read-only. Browse, clone, fetch, existing reviews, and verified bundle export remain available. Push, browser edits, review mutations, and write credentials are rejected.
Deleted
Repository bytes are removed. Identity, actor, reason, and lifecycle history remain as an audit tombstone.
  1. Export first.Choose Export all refs to download a verified Git bundle independent of archive state.
  2. Archive.This is reversible. Confirm that expected clones can still fetch and that automation no longer needs to push.
  3. Reactivate if needed.An Archived repository can return to Active without changing its identity.
  4. Delete only when required.Enter an audited reason and type the repository slug exactly. Byte deletion is permanent; the tombstone is not.

Public access has three gates

Anonymous repository reads require an explicitly public organization, an explicitly published project, and a public repository. A public child never makes a private parent public. New repositories and imports begin private.

Current UI boundary

Repository Settings › Access shows the repository's publication state, but that state is informational and read-only in the current workspace. Project Settings › Public access governs the project gate; it does not inventory repositories or prove that this repository is public.

09 / Limits and security

Know the enforced boundaries.

BoundaryCurrent behavior
Repository slug1-100 characters with an alphanumeric first and last character. New-repository creation accepts lowercase letters, digits, and hyphens; bundle import also accepts underscores.
Repository name1-180 characters.
Description16 KiB maximum.
Credential lifetime1-365 days; 90 days by default.
Active credentials32 per user per repository.
Git transportHTTPS smart HTTP and Git LFS; no SSH Git transport.
ImportVerified Git bundle containing refs/heads/main; upload size is bounded by the operated installation.
  • Keep tokens out of URLs, commits, logs, screenshots, and issue descriptions.
  • Use separate credentials for separate devices or automation so each can be revoked independently.
  • A push is checked against the exact target ref and branch policy; a valid write token does not bypass review rules.
  • Repository operation history and description revisions are retained even when current prose or bytes change.
10 / Troubleshooting

Resolve common failures.

The repository is Provisioning or Provisioning failed

Files and Git transport are available only after lifecycle Active. Return to Code to inspect the state. A failed import does not expose partial Git data; correct the bundle or details and start a new import.

Git returns authentication failed

Use username git and the show-once token as the password. Confirm that it is unexpired, unrevoked, bound to this exact repository, and includes git_read for fetch or git_write plus git_read for push.

Push is rejected although the token has Git write

The repository may be Archived, the target branch may require pull-request admission, or your effective role may no longer include Manage source. A token authenticates the user; it does not freeze authorization at issue time.

Bundle import says the default branch is missing

Verify the bundle locally and ensure it contains refs/heads/main. A bundle containing only a differently named branch is not accepted by the current import workflow.

An expected public repository returns not found

Check all three gates: organization, project, and repository. Mozaic intentionally returns not found when anonymous access is not authorized, rather than disclosing private resource existence.