SISuperintelligenceDocs

Search docs

Search every page of the documentation.

Git

Repositories

Create repositories, then clone and push over HTTPS with a key as the password.

Create a repository

In Cloud (Repositories → New repository) or the Git portal (your organization → New repository). You need git:write. Names are 3–40 lowercase letters, numbers and dashes, unique in the organization.

Repositories are stored in AWS CodeCommit in the platform's home region, us-west-1, one per repository and named after your organization, so other organizations can't see or reach them.

Clone URL

https://git.gov.vin/<org>/<repo>.git

<org> is your organization's slug. The Git portal's Code button shows the URL with a copy button, and so does the repository list in Cloud.

Authenticate

Git uses HTTP Basic authentication. The username can be anything; the password is a key of your organization:

ToThe key needs
Clone, fetch, pullgit:read
Pushgit:write

Any key type works; an API key with just the git scopes is the usual choice. Expired and revoked keys are rejected. Git asks for credentials only after the server challenges it, and a credential helper saves you entering the key each time.

git clone https://git.gov.vin/<org>/<repo>.git
# Username: anything
# Password: the key

A key from another organization is rejected and Git asks for credentials again. A repository that doesn't exist answers 404.

Branch protection

Settings → Branch protection (needs git:write) protects the default branch: it then changes only through pull requests with the number of approvals you set (1–10). Web commits to it must go to a new branch, and git push to it is refused:

remote: main is protected: changes need a pull request with 1 approval.
remote: Push to another branch and open a pull request.
 ! [remote rejected] main -> main (protected branch)

A push that also updates other branches is refused as a whole. Changing the number of approvals, or the default branch, applies to open pull requests too.

Edit in the browser

The portal can create, edit, upload, move and delete files and commit them to the branch or to a new branch with a pull request. A web commit can change up to 1,000 files and 50 MB of content; changes over 100 files or 4 MB upload their files first and take a little longer. If the branch moved since you started, the commit is refused and you can commit to a new branch instead.

Download a ZIP

Code → Download ZIP downloads a branch or tag. Small repositories download at once; larger ones are packed in the background (the page waits and starts the download, usually within a minute) and kept for 7 days. Repositories over 512 MB at one commit can't be downloaded as a ZIP; clone them.

Pushing deploys

Pushing a branch starts a deployment for every project linked to the repository (see The build pipeline). Pushing tags and deleting branches don't deploy.

Limits

  • One push request can carry up to about 6 MB. Larger pushes fail; push in smaller pieces, for example a few commits at a time.
  • Requests time out after 5 minutes.
  • Pushes larger than 6 MB. Coming soon

Delete a repository

In the Git portal, open the repository's Settings → Delete repository and type its full name to confirm (needs git:write). This deletes its branches and history and can't be undone. Its issues and pull requests are no longer shown.