Skip to content
Git: your org's repositories

Git: your org's repositories

Every organization has its own git service, private to its members:

  • one repository per project, <org>/<project>, for everyone in the organization and the project’s machines;
  • one of your own, home, for you and the machines that work for you;
  • repositories of the organization, <org>/<name>, that members and agents make for work that isn’t one project’s, shared with every project or with the ones you choose (below).

<org> is your organization’s slug, the one in the portal’s addresses. In the git service you are your handle, so your own repository is <handle>/home; ~/home always means yours. You get a handle from your email address when you sign up and can change it under Account → Profile. The git service follows a new handle, and clone URLs with the old one, or with the ids that older URLs show, keep working.

A project’s repository and your own come and go with projects and members: you don’t create or delete them, and each is made the first time someone uses it. Pull requests and issues are on; actions (CI), wikis, releases and forks are off.

Repositories of the organization

Repositories in a project in the portal lists them after the project’s and your own, in the same list, each with an org badge. New repository makes one: give it a name of 3 to 40 lowercase letters, digits and dashes. A name is a project’s short name or a repository’s, never both, so a project’s name is refused, and a new project can’t take a repository’s name either. The buttons beside it show the repositories as cards or as a list; each one says in a few words who reaches it (“Developers write, members read”, “Only you”), and hovering, focusing or tapping that says it in full.

The Repositories page: the project's repository main, Your own repository, and the organization's repository shared-lib with its org badge, each with who reaches it, with the grid and list buttons and New repository at the top right The Repositories page: the project's repository main, Your own repository, and the organization's repository shared-lib with its org badge, each with who reaches it, with the grid and list buttons and New repository at the top right
The New repository dialog with the name design-docs, Cancel and Create repository The New repository dialog with the name design-docs, Cancel and Create repository
  • Whoever made it writes it; everyone else in the organization reads it. An agent’s repository is written by that agent (space-env git create in its machine). An agent writes the ones it made and the ones its owner made, not another agent’s, its supervisor’s included: a subagent reads its supervisor’s repository and pushes to one of its own.
  • A name is the organization’s. Two repositories never share one, even when they are shared with different projects, so space-env git create can refuse a name that no list in your machine shows: it says the repository isn’t shared with this project. Pick another name, or ask an owner or admin to share it.
  • Only people delete one, in the portal: whoever made it, the owner of the agent that made it, or an owner or admin of the organization. Its card’s menu (⋯) has Delete, which asks first: the history, branches, issues and pull requests go with it, and that can’t be undone.
  • They are shared with the whole organization, or with chosen projects. A new one is shared with every project. Its card says with whom (“Shared with: whole organization”, or the projects’ names). Shared with a project, that project’s machines reach it with their user’s rights: a machine pushes to the ones its user made and reads the others (space-env git repos lists them). An agent’s machine also pushes to the ones the agent made. Machines and agents of other projects don’t reach it, not even its maker’s machine in another project. Everyone in the organization still sees and reads every one here in the portal. A card’s menu copies the clone command for each.
  • Owners and admins change the sharing with Sharing in the card’s menu (⋯): the whole organization, or the projects they tick. With no project ticked, only people in the portal and API keys with All projects reach it.
  • Owners and admins rename one with Rename in the card’s menu. The new name follows the same rules as a new repository’s. The old name stops working at once: every clone needs its remote changed, git remote set-url origin <new clone URL>, and the old name is free for a new repository or project.
  • On your computer, an API key with All projects reaches every one, as the browser does; a key with selected projects reaches the ones shared with one of its projects (below).

On your own computer

Set git up once:

space repos setup

This makes git ask space for a credential when it talks to your org’s git host (what it writes). Then list the repositories and clone one:

space repos
NAME        KIND     ACCESS      CLONE URL
web         project  read-write  https://git.lab.agent-spaces.eu/acme/web.git
shared-lib  free     read-only   https://git.lab.agent-spaces.eu/acme/shared-lib.git
home        home     read-write  https://git.lab.agent-spaces.eu/~/home.git

free is a repository of the organization; ACCESS says whether you can push to it.

git clone https://git.lab.agent-spaces.eu/acme/web.git
cd web
git switch -c fix-typo
sed -i 's/teh/the/' README.md
git commit -am "Fix a typo"
git push -u origin fix-typo

There is no password to type and nothing to keep: space hands git a credential that lasts an hour and gets a new one when needed.

  • It reaches what your API keys reach. A profile sees the repository of every project its key reaches, and your own. A key with All projects also sees all of the organization’s repositories, a key with selected projects the ones shared with one of its projects: it reads them and pushes to the ones you made. One credential covers every repository the key reaches. For another organization, log in with a key of it in another profile (space --profile <name> login) and run space repos setup again: git then gets its credential from whichever profile’s key sees the repository you clone, fetch or push, and from your default profile for your own home (if that profile’s org is on the same git host; else from the first profile by name that is).
  • A read-only key can clone and fetch, not push, also not to a repository you made.
  • A Member reads, and pushes nowhere. In an organization where your role is Member, you clone and fetch every repository you reach but push to none, make no repositories, and your agent’s machine doesn’t push either, whatever your API key allows. Developers, admins and owners push as above.
  • A push is at most 64 MB. Bigger ones are refused; push in smaller steps.
  • A repository holds at most 10 GiB, and all your organization’s together 10 GiB too (by default; your plan may allow more). Repositories in a project in the portal shows how much each holds, on its card. Once a repository or the organization reaches its limit, pushes to it are refused until it is smaller or the plan allows more. Large files (Git LFS) aren’t supported.

A clone made with the old name, git.<region>.polder-vm.eu, no longer reaches the repository: run space repos setup again and point the clone at its new URL, with your region, organization and repository in it (git remote set-url origin https://git.<region>.agent-spaces.eu/<org>/<repository>.git).

In the browser

Open Repositories in a project in the portal and click a repository’s card: its pages open right there, beside the project’s sidebar, in the portal’s look. Its tabs are Code, Issues, Pull requests and Settings: browse code and history, open and review pull requests, comment, and work with issues. You are signed in through AgentSpaces; if you aren’t signed in there yet, you are sent to do that first.

The portal’s address follows the page you are on, so a reload or a copied link opens the same page again. A notification of a pull request (one an agent of yours opened, a review you’re asked for, a mention) opens it there too, under the project whose repository it is; your own home and the organization’s other repositories open under its first project. A link to the git host itself (a bookmark, a link in a message) takes you to the same page in the portal.

When nobody used the repositories for a while, they take a few seconds to resume: the portal says so while it waits.

In a machine

A machine needs no setup and holds no credential: the platform signs it in as the person it works for. It reaches its own project’s repository and that person’s home.

git clone http://git.space/acme/web

space-env git setup adds the short form git clone space:web, and space-env git pr and space-env git issue handle pull requests and issues from the shell. See Git in a machine.

When it doesn’t work

  • git asks for a user name and password. The helper had no answer. Run space repos: it tells you when the helper isn’t set up, and fails with the reason when your API key is missing or expired (space login).
  • repository not found. The repository is in a project none of your profiles’ API keys work in, it is one of the organization’s that isn’t shared with a project of your key (and no profile’s key has All projects), it was renamed (git remote set-url), or the name is wrong. space --profile <name> repos lists what each profile can use. If you set git up before profiles were picked per repository, run space repos setup again.
  • A push is refused with 403. Your API key is read-only, your role in the organization is Member, or the repository is the organization’s and someone else made it (space repos shows read-only). git prints the reason after remote:.
  • A push is refused with 413, or “pack exceeds maximum allowed size”. It is over 64 MB.
  • remote error: push refused: the repo ... holds .... The repository, or all your organization’s repositories together, reached the plan’s limit. Remove large files from its history, or ask for a bigger plan.
  • The first clone takes a few seconds. The git service is suspended when nobody uses it and resumes on the first request.
Last updated on