commitdog setup once per platform — you can store tokens for all four (GitHub, GitLab, Gitea, and Forgejo) at the same time.
1
Run the setup command
Open a terminal and run:commitdog will ask which platform you want to configure:Enter the number for your platform and press Enter. Option
5 removes a previously configured platform instead of adding one; see Remove a platform.2
Enter your email
commitdog will prompt you for the email address associated with your platform account. This email is applied per-repo via
git config --local so your global Git config stays untouched.If you already have an email saved, commitdog will show it and ask if you want to change it.3
Create and enter your token
commitdog will display where to create your token and which scopes are required (see the platform-specific instructions below). Paste your token at the prompt.Token validation runs locally — commitdog checks the token format before saving it.
4
Confirm the saved config
After saving, commitdog confirms the location of your config file:Repeat
commitdog setup for any additional platforms you want to configure.Token requirements by platform
Create a personal access token on your platform with the scopes listed below, then paste it into thecommitdog setup prompt.
- GitHub
- GitLab
- Gitea
- Forgejo
Create a classic personal access token at github.com/settings/tokens.Required scopes:
commitdog expects a classic PAT. Fine-grained tokens are not supported. Your token must start with
ghp_ or github_pat_.Remove a platform
To disconnect a platform you no longer use, runcommitdog setup and pick option 5. commitdog lists your configured platforms and asks which one to remove:
- Deletes the token, host, and email for that platform from
~/.config/commitdog/config.toml - Removes the platform’s git remote from the current repo
- Removes the platform from the
.commitdogfile in the current repo
mirrors list. If it is your primary platform, commitdog clears the primary from .commitdog and you need to run commitdog init again to reconfigure the repo.
Where your config is stored
commitdog writes your credentials to:0600 permissions (readable only by your user). A typical config looks like this:
Your tokens never leave your machine except when commitdog makes a direct API call to the platform (for example, when creating a repo or publishing a release). No data is sent anywhere else.
Start a new repository
Oncecommitdog setup is complete, you can create a new repository on your platform and push your first commit — without opening a browser:
git init, makes the first commit, sets the remote, and pushes.
.commitdog file already exists in the directory, commitdog reads the platform from it and skips the platform prompt.