GitHub storage and commit signing
Atlas stores a project as files under .project/. A project owner can connect
that folder to a GitHub repository. Members then edit in Atlas while the server
commits and pushes on their behalf.
Git identity and GPG keys are personal settings. They apply to every project and
live in patlas.db on the Atlas server, not in .project/ and not in Git history
as a settings file.
Owner setup
Only the project owner can configure storage.
- Create a fine-grained GitHub PAT for the repository.
- Grant Contents: read and write.
- Open project Settings, Repository.
- Enter
owner/repo, an optional branch, and the PAT. - Save.
Adding a repository is a non-destructive remote setup. Atlas validates access,
stores the repository and PAT, and points origin at the repository. It does not
check out another branch, pull or push.
Use Pull to fast-forward from the remote. Use Push to send queued local
commits. The 60 second timer also pushes when commits are queued. A new branch is
created on the remote by the first push.
Disconnect removes origin and the stored remote settings. The local clone,.project files, branches and Git history stay on the server. The GitHub
repository is not changed.
No GitHub App, OAuth callback, deploy key or webhook is required. Members do not
need access to the repository.
The PAT is stored only in patlas.db. It is never returned by the API and never
written to .git/config.
Member setup
Every member configures their own Git identity and signing key.
1. Set a commit email
Open My settings from the project topbar, or go to /settings. Set the commit
name and email under My git config.
The email must be verified on the member's GitHub account. GitHub compares the
commit's committer email with the GPG key identities and the account's verified
emails.
2. Generate a dedicated GPG key
gpg --quick-generate-key "Your Name <you@users.noreply.github.com>" ed25519 sign 0
Use a dedicated key for Atlas. Export the private key:
gpg --armor --export-secret-keys <fingerprint>
Paste the armored private key into My settings, My git config. Add the passphrase
if the key has one. The server keeps the key and passphrase in patlas.db so it
can sign while the member is offline.
3. Add the public key to GitHub
After saving, Atlas shows the public key and fingerprint. Copy the public key and
add it to GitHub:
- GitHub, Settings, SSH and GPG keys.
- New GPG key.
- Paste the public key.
Future commits by that member show Verified when the key is valid and the
commit email matches the key and the GitHub account.
How attribution works
Git stores two identities on every commit:
- author, the person who wrote the change
- committer, the person who created the commit
Atlas sets both to the editing member and signs with that member's key. The
project PAT pushes the commit, but the pusher is not part of the commit.
GitHub checks the committer email against the GPG key and the member's verified
GitHub email. The author can differ, but Atlas keeps both the same so a commit is
not marked Partially verified.
flowchart LR
Member[Member edits in Atlas] --> Commit[Commit: author and committer = member]
Key[Member GPG key] --> Sign[Sign commit]
Commit --> Sign
Sign --> Push[Server pushes with project PAT]
Push --> GitHub[GitHub verifies committer email and key]
Trust model
The member gives the server a private signing key. The server can sign any commit
as that member. This is the same authority the member has locally.
Use a dedicated key. Revoke it on GitHub and remove it in Atlas if the member
stops trusting the server or leaves the project.
The key and passphrase are stored in patlas.db. The database is 0600 and the
data directory is 0711. The directory allows traversal but not listing, so
nginx can read project artifacts as www-data while every file keeps its own
mode. Database backups contain the key, so protect backups the same way, keep
them 0600 inside that directory.
The server imports each key once into an isolated keyring and reuses it for later
commits. The keyring lives in memory-backed storage when available. patlas.db
remains the source of truth.
Signed commits on the server
For each commit the server:
- Creates a temporary GPG home outside the repository.
- Imports the member's private key.
- Signs the commit with that key.
- Kills the temporary
gpg-agent. - Removes the temporary directory.
The key never enters .project/ or the clone directory.
Initialization and migration commits use a service identity and are not signed.
They are system actions, not member edits.
Sync behavior
Atlas never rebases signed commits. Rebasing would rewrite commits, change the
committer and drop signatures.
- Edits commit locally and mark the project as pending push.
- On an initialized project, a save never fetches from the remote. It returns
after the local commit and snapshot rebuild. - A background sync pulls when the runtime starts and every 60 seconds while it
stays active. - Network sync runs outside the edit lock, so a pull or push does not delay a
save. - The timer only pushes when there are unpushed commits.
- It also fast-forwards remote changes when possible.
- A pull that does not move HEAD is silent. It does not broadcast a sync
message or reload open boards. - A pull that moves HEAD broadcasts the sync state and the content diff.
- Sync status changes, such as pending to synced, update the status dot without
reloading the board. - Pull fast-forwards when possible.
- Push sends queued commits. If the remote has diverged it reports the
rejection and does not force. - When a member-triggered pull needs a merge, Atlas creates a merge commit signed
by that member. - Original commits keep their authors, committers and signatures.
- A merge conflict aborts the merge without dropping local work.
The timer stops when the project runtime is evicted after 30 minutes idle.
Require signed commits
A project owner can enable Require signed commits in Repository settings.
When enabled:
- Members without a GPG key cannot create or change content.
- Webhooks fail until the webhook creator has a key.
- Merges created by a sync must be signed.
The setting is off by default. Initialization and migrations are still allowed.
Identity fallback
The database stores overrides. Empty values inherit:
| Setting | Override | Fallback |
|---|---|---|
| Commit name | user_git_config.commit_name | project member display name, then nickname |
| Commit email | user_git_config.commit_email | legacy person email, then <name>@patlas.local |
| Signing key | user_git_config | no signature |
A member without a GPG key can still commit. The commit is unsigned and uses the
project member name. It will not show as Verified on GitHub.
Test pipeline
Copy .env.test.example to .env.test and fill in the test repository and PAT.
The file is ignored by Git.
bun run test:e2e:github
The script:
- checks the token can push to the test repository
- starts a temporary Atlas server
- creates two or three members with separate GPG keys
- adds a real GitHub repository without pushing or changing local data
- creates issues and verifies author, committer and signature
- checks owner-only repository settings
- checks
requireSigningand identity fallback - checks key rotation and removal
- checks a new branch created from the default branch
- checks reuse of an existing branch
- restores a force-pushed remote branch without data loss
- disconnects and reconnects while keeping local data and the remote branch
- confirms a push with no queued commits is a no-op
- confirms the default branch was not touched
- deletes the test branches
Use unique branches. Do not point the pipeline at a production repository.
The GitHub Actions workflow in .github/workflows/github-e2e.yml runs the same
script on demand and on a weekly schedule. It needs these repository settings:
| Name | Kind | Value |
|---|---|---|
PATLAS_TEST_REPO | variable | owner/repo |
PATLAS_TEST_TOKEN | secret | PAT with Contents read and write |
PATLAS_TEST_COMMIT_EMAIL | variable | verified email for Alice |
PATLAS_TEST_GPG_PRIVATE_KEY | secret | optional pre-registered key |
PATLAS_TEST_GPG_PASSPHRASE | secret | optional key passphrase |
PATLAS_TEST_EXPECT_VERIFIED | variable | 1 to assert GitHub Verified |
Without a pre-registered key the pipeline still verifies signatures locally withgit verify-commit. The GitHub Verified assertion needs the public key on the
test GitHub account.
Troubleshooting
GitHub does not show Verified
Check the commit email, the key UID and the GitHub account. All three must match:
git log -1 --format='%an <%ae> | %cn <%ce>'
gpg --list-keys <fingerprint>
The email must be in the key UID and verified on GitHub. The public key must be
added as a signing key.
The key cannot sign
The passphrase may be wrong. The key may be expired or revoked. Atlas rejects
expired and revoked keys when they are saved.
gpg is missing
Atlas needs GnuPG installed on the server. The test pipeline also needs gpg,git and Bun.
The PAT stops working
Rotate it in project Settings, Repository. Leave the token field blank to keep
the current token. A new token replaces it.