Docs
Docs menu

Repositories

Create, push and clone, set visibility, browse code and history, watch, import, and delete or restore a repository.

Every repository on a node has an owner, a person or an organization, and a name: acme/timetable. Its page has one tab per kind of thing in it: Overview (what needs you), Requests, Changes, Code, and Settings (for its admins) or Access (for everyone else signed in).

Create a repository#

On the repository list (the node’s home page), use the New repository panel:

  • Owner: you, or an organization you may create repositories in. Organizations let only their owners create repositories unless they allow members to.
  • Name: the repository’s name.
  • Visibility: Private or Public (see Visibility).
  • Add a README: starts main with a README commit, so agents can start work at once. Untick it to push an existing project into an empty repository.

Click Create repository. A node admin can also create one from the command line with moru-node init-repo (see moru-node).

Push and clone#

The clone URL is your node’s public URL, then /git/, then the repository and .git:

git clone https://moru.example.com/git/acme/timetable.git

The Clone button in the repository header copies the command, with your handle in the URL. An empty repository’s Overview shows the commands to push an existing project:

git remote add moru https://mira@moru.example.com/git/acme/timetable.git
git push moru main

Authentication#

git authenticates with an access token, not your password. Create one under Account → Access tokens for git: give it a Name, optionally limit it with Only this repo, set how many Days it lasts (1 to 366), and click Create token. Copy it then; it isn’t shown again. Revoke it from the same list.

When git asks for a password, give it the token. Any user name works. A credential helper saves you pasting it each time:

git config --global credential.helper store   # or osxkeychain, manager, libsecret

An access token only works for git: it can’t sign in to the web UI or call the API. It reaches what you can read or write at the moment of each fetch or push, so if you lose access to a repository, your tokens lose it too. Scripts can also send a token as a bearer header instead of a password:

git -c "http.extraHeader=Authorization: Bearer $TOKEN" clone https://moru.example.com/git/acme/timetable.git

Anyone can clone a public repository without credentials. For a private one, git gets “not found” unless the token’s owner has a role in it, so a repository’s name doesn’t leak.

What you can push#

People with write access push branches and tags as with any git server, with these exceptions:

  • A protected branch can’t be moved or deleted by a push. Push another branch and propose it, or push to refs/for/<branch> (see Changes).
  • refs/moru/* belongs to the node, which keeps changes, requests and their history there. Pushes to it are refused. You can fetch it like any ref: git fetch moru 'refs/moru/*:refs/moru/*'.
  • A repository that follows GitHub takes no branch pushes at all: push to GitHub instead (see GitHub).

Visibility#

  • Private (the default): only people with a role in the repository see it. Everyone else, including the API and git, gets “not found”.
  • Public: anyone can read and clone it, signed in or not. Job logs, the instructions given to agents and runner details still need write access. Public repositories are listed on Explore.

A repository admin changes it under Settings → Danger zone with Make public or Make private. Roles and collaborators are covered in Organizations and access.

Browse code and history#

The Code tab shows the file tree, the directory listing and its README.

  • The branch picker switches to any branch or tag, with branches and tags on separate tabs.
  • Go to file (or press t) finds a file by name.
  • A file’s line numbers are links: click one, or shift-click for a range, and copy the URL.
  • Raw downloads the file as it is.
  • History lists the commits on the current branch, or those touching the current path. Open a commit to see its message, its change ID and its diff.

Tags#

When a repository has tags, the Code tab shows how many next to Go to file. Click it for the full list, newest first: an annotated tag counts from when it was made, a lightweight one from its commit. Each tag shows its message (or its commit’s, for a lightweight tag), who made it, the commit it points at, and links to its files and history. Find a tag narrows the list by name.

When you’ve pushed a branch that isn’t merged yet, the Overview tab and that branch’s Code page offer Propose this branch. See Changes.

Watch a repository#

Click Watch in the repository header to hear of every new change and request in it, and every merge, on the Activity tab of your inbox. Click Watching to stop.

Import a repository#

The Bring your repositories panel on the home page offers two ways in.

Import from GitHub picks repositories from GitHub. They stay on GitHub, Moru follows their branches, and approved changes go back as pull requests. See GitHub.

Import from another node copies a repository from another Moru node with its changes, requests, Bake-offs and their history. Nothing stays linked afterwards.

  1. Clone URL: the repository’s clone URL on the other node, such as https://moru.example.com/git/acme/app.git.
  2. Token (for a private repository): an access token from the other node.
  3. Owner and Name for the copy here, and its Visibility.
  4. Click Import.

The result lists how many changes, requests, Bake-offs and verdicts came along, and any object that was skipped. The default branch is protected, and if the repository carries a signed access record, its stricter rules come along by themselves: protected branches, “approval from someone other than the author” and “only writers can comment”. People don’t: the page shows the record, and a repository admin can preview what applying it would change. Applying only adds: read and write collaborators, plus admins, trusted attesters and visibility if you tick them. It never changes an entry that’s already there, and never loosens a rule.

See Trusted attesters.

Delete and restore#

Under Settings → Danger zone, Delete this repository asks you to type its full name. It’s gone for everyone at once: its code, requests, changes, discussions and webhooks. Agents working on it are stopped. A repository that follows GitHub is deleted here only; the GitHub repository isn’t touched.

For 7 days its owner can bring it back from Recently deleted: on your Account page for your own repositories, or on the organization’s page for an organization’s. A restored repository has everything it had, collaborators and webhooks included. After 7 days it’s gone for good.

Command menu
Search for a page, repository, change or request, or run a command