Skip to content

Where people and agents ship software together. The open-source git platform for the whole job: issues, agents, checks and deploys to the edge.

139 linesCodeBlameRaw
1---
2title: Audit log
3description: Every change people and tokens make through the API, the MCP server and git, with whether it was allowed and the rule that decided.
4---
5
6Every workspace keeps an audit log. It records:
7
8- **Every change people and workspace tokens make** through the API, the
9 MCP server and git: opening and closing issues, comments, merges,
10 settings, pushes. Reads by people are not recorded. A workflow job's
11 [`G1T_TOKEN`](/guides/actions/#the-jobs-token) is recorded as that job's,
12 under its run.
13
14- **A repository's lifecycle**, wherever the change was made, g1t.sh
15 included. A transfer is recorded in both workspaces' logs, and a
16 workspace's deletion as `workspace.deleted`. A restore by g1t's support
17 is recorded as `workspace.restored`, and the purge 30 days after a
18 deletion as `workspace.purged`, its log's last entry.
19
20| Action | Recorded when |
21| --- | --- |
22| `repo.renamed` | A repository was renamed. |
23| `repo.visibility_changed` | It was made public or private. |
24| `repo.default_branch_changed` | Its default branch changed. |
25| `branch.renamed` | A branch was renamed. |
26| `repo.archived`, `repo.unarchived` | It was archived, or unarchived. |
27| `repo.transferred` | It moved to another workspace. |
28| `repo.deleted`, `repo.restored`, `repo.purged` | It was deleted, restored, or removed for good. |
29| `repo.collaborator_added`, `repo.collaborator_role_changed`, `repo.collaborator_removed` | Someone was given a role on it, had it changed, or lost it. See [access and roles](/guides/access-and-roles/). |
30| `repo.invitation_created`, `repo.invitation_revoked` | Someone was invited to it, or an invitation was withdrawn. |
31| `repo.deploy_key_added`, `repo.deploy_key_removed` | A [deploy key](/guides/git/#deploy-keys) was added to it, saying whether it may write, or deleted. |
32| `workspace.base_permission_changed` | An owner changed what members get on every repository. |
33| `member.added`, `member.removed`, `member.left` | Someone joined the workspace (added by an owner, or with an invite), was removed by an owner, or left. See [members and roles](/guides/workspaces/#members-and-roles). |
34| `member.role_changed` | An owner made someone an owner or a member. |
35| `member.org_role_added`, `member.org_role_removed` | An owner made someone a billing manager or a security manager, or took it away. |
36| `workspace.ownership_transferred` | An owner handed the workspace to another member. |
37| `workspace.member_privileges_changed` | An owner turned a [member privilege](/guides/workspaces/#member-privileges) on or off. |
38| `workspace.two_factor_required`, `workspace.two_factor_not_required` | An owner started or stopped [requiring two-factor authentication](/guides/workspaces/#require-two-factor-authentication). |
39| `workspace_token.created`, `workspace_token.changed`, `workspace_token.deleted` | An owner made, changed the permissions or repositories of, or deleted one of the workspace's [access tokens](/guides/workspaces/#workspace-access-tokens). |
40| `token.created`, `token.deleted`, `token.rescoped` | A member made, deleted or changed the permissions or repositories of one of their own [access tokens](/guides/authentication/#access-tokens). Recorded in each of their workspaces. |
41| `ssh_key.added`, `ssh_key.removed` | A member added or removed an SSH key. Recorded in each of their workspaces. |
42| `oauth_grant.created`, `oauth_grant.rescoped`, `oauth_grant.revoked` | A member [signed in to an application](/guides/authentication/#signing-in-with-oauth), changed what it may do, or signed it out. Recorded in each of their workspaces. |
43| `two_factor.enabled`, `two_factor.disabled` | A member turned [two-factor authentication](/guides/authentication/#two-factor-authentication) on or off. Recorded in each of their workspaces. |
44| `token.policy_changed` | An owner changed the workspace's [rules for personal access tokens](/guides/authentication/#a-workspaces-rules-for-tokens). |
45| `token.approval_requested`, `token.approved`, `token.denied` | A member's token made for the workspace asked to reach it, and an owner approved or denied it, with their note. |
46| `token.revoked` | An owner revoked a member's token in the workspace, with their note. |
47| `workspace.team_creation_changed` | An owner changed who can create teams. See [who can create teams](/guides/teams/#who-can-create-teams). |
48| `team.created`, `team.edited`, `team.deleted` | A [team](/guides/teams/) was created, changed or deleted. |
49| `team.member_added`, `team.member_role_changed`, `team.member_removed` | Someone was added to a team, made its maintainer or a member, or taken out of it. |
50| `team.repo_added`, `team.repo_role_changed`, `team.repo_removed` | A team was given a role on a repository, had it changed, or lost it. |
51| `package.delete`, `package.restore`, `package.purged` | A [package](/guides/packages/#delete-and-restore) was deleted, restored, or removed for good 30 days after it was deleted. |
52| `package.delete_version`, `package.restore_version` | One of its versions was deleted or restored. |
53| `package.access_added`, `package.access_role_changed`, `package.access_removed` | A person or team was given a role on a package itself, had it changed, or lost it. |
54| `package.actions_access_added`, `package.actions_access_role_changed`, `package.actions_access_removed` | A repository's workflows were given access to a package under [Manage Actions access](/guides/packages/#manage-actions-access), had it changed, or lost it. |
55| `package.inherit_access_changed` | Inheriting access from the linked repository was turned on or off. |
56| `package.visibility_changed` | A package was made public or private. |
57| `package.linked`, `package.unlinked` | A package was linked to a repository (from its settings, or by an image's source label), or unlinked. |
58| `workspace.residency_changed` | An owner changed where the workspace's new repositories are stored. See [data residency](/guides/workspaces/#data-residency). |
59| `account.deleted`, `account.deleted_by_staff` | A member [deleted their account](/guides/authentication/#deleting-your-account), or g1t's staff deleted it, and so left the workspace. Recorded in each of their workspaces. |
60| `workspace.deleted`, `workspace.restored`, `workspace.purged` | An owner deleted the workspace (or g1t's staff did, with the [deleted account](/guides/authentication/#what-stands-in-the-way) that was its only owner), g1t's support restored it, or it was removed for good. See [deleting a workspace](/guides/workspaces/#delete-a-workspace). |
61
62Through the API and the MCP server, the call itself is recorded under its
63operation's name too, such as `delete_repo`. See
64[managing a repository](/guides/managing-repositories/).
65
66Refusals are recorded too, with the rule that refused them. A push
67refused before it sends anything, such as one with a token that does not
68reach the repository or may not push, is recorded as a denied `git.push`.
69Entries are only ever added: nothing edits or removes one.
70
71## What an entry says
72
73| Field | What it is |
74| --- | --- |
75| Time | When it happened, to the millisecond. |
76| Actor | Who did it: a person, or the workspace for its own tokens and deploy keys. |
77| Run | The workflow run whose job's token did it, as `workflow_job`. |
78| Credential | The id of the token used: on the API, the MCP server or git, or on g1t.sh by a token [used on the website](/guides/authentication/#use-a-token-on-the-website). Empty for a person signed in on g1t.sh. |
79| Action | The API or MCP operation, such as `create_issue`, or `git.push` and `git.fetch`. |
80| Target | The repository, the issue or pull request number, and for git the refs it moved. |
81| Outcome | `allowed` or `denied`. |
82| Rule | What decided it: a refusal rule, such as `scope:repository`, or `token:repository` for a workflow job's token used on another repository; or, for people, their own access. A push allowed through is `person`, `workspace-token`, `deploy-key` or `agent-token`, after what pushed. A refusal by the repository's own rules is `service` (or `repository` for git). |
83| Result | `ok`, or the reason it failed. |
84| Request id | The request's id, the same one Cloudflare logs it under. |
85
86## Read the log
87
88Open the workspace's settings and choose **Audit log**, or go to
89`g1t.sh/<workspace>/-/audit`.
90
91- **Owners** see everything in the workspace.
92- **Members** see what was done to the workspace's projects, and anything
93 they did. Changes owners made to the
94 workspace itself are for owners.
95
96Filter by actor, action, project, outcome, who acted (people or workspace
97tokens), and a range of days.
98The filters are part of the page's address, so a filtered view can be
99shared with anyone who can see it.
100
101## How long it is kept
102
103How far back the log goes depends on the workspace's plan:
104
105| Workspace | Kept |
106| --- | --- |
107| Free | **7 days** |
108| On the [g1t plan](/guides/usage-and-billing/#the-g1t-plan) | **90 days** |
109| Paid for by an [enterprise](/guides/usage-and-billing/#enterprises-and-custom-terms) | **90 days** |
110| Longer, by arrangement | Up to **400 days** |
111
112The log can be read and exported back that far, and no further. Once a
113day, entries older than that are **deleted**, and cannot be brought back:
114export what you need to keep before then. Starting the plan keeps 90 days
115from then on; entries already deleted stay deleted. Ending it goes back to
1167 days, and the next daily pass deletes what is older.
117
118For a longer log, such as for a compliance requirement, email
119[support@g1t.sh](mailto:support@g1t.sh). g1t can set the workspace's
120account to keep up to 400 days, and what is set there takes the place of
121the plan's. A [self-hosted](/guides/self-hosting/) g1t that does not charge
122keeps 90 days for every workspace.
123
124## Export
125
126**CSV** and **JSON** on the Audit log page download what the current
127filters match, up to 10,000 entries, newest first. The CSV has one column
128for each field above; a cell that a spreadsheet would read as a formula is
129written as text.
130
131## What is not recorded
132
133- Reads by people and workspace tokens.
134- Most of what people do on the website itself. The API, the MCP server
135 and git are recorded, and so are the changes to members, roles, access,
136 tokens, keys, applications, two-factor authentication and workspace
137 settings in the table above, wherever they are made.
138- What g1t does on its own, such as closing a dependency update that is no
139 longer needed. Those changes are in the pull request's timeline.