Preface¶
When running coding agents with DeepSeek Harness (dsh), the git commit in the conversation is mostly handled by the bash tool. The author field looks like just user.name / user.email, but it can actually be easily changed: in a certain round of dialogue, you can write -c user.name="DSH Agent", or change the repository or global configuration to a placeholder identity, and subsequent commits will always be under the wrong author. The GitHub contribution graph does not match, code reviews cannot match the person, and you have to go back to check the reflog during troubleshooting.
The design principle of DeepSeek Harness is “everything is a plugin”: models, tools, sessions, sandboxes and interfaces can be replaced at the configuration layer without modifying the framework source code. The official repository is deepseek-ai/deepseek-harness, which is currently in developer preview. The community directory deepseek-harness-plugin.com is an independent collection site, not officially affiliated with DeepSeek / Magic Square, and cannot be regarded as an official app store.
What dsh-git-identity does is very narrow: when the plugin is loaded, it parses the “own git identity of this environment”, writes it into GIT_AUTHOR_* / GIT_COMMITTER_*, overriding all subsequent git configs. This article is organized after cross-checking the directory details page, GitHub README / package.json / index.mjs / cordis.patch.yml, and the official Harness repository.
What is this¶
dsh-git-identity is a development and runtime plugin for DeepSeek Harness, maintained by LoserFox, with the repository at LoserFox/dsh-git-identity. The directory page is consistent with the GitHub repository introduction: git commits will always use the environment’s own author identity, prioritizing gh CLI logged-in accounts and GitHub noreply emails, then overriding all git configs with environment variables.
The npm package name in the repository’s package.json is @loserfox/git-identity, current version 0.1.0. It declares dsh.bundle.patch pointing to cordis.patch.yml, so according to the official documentation, it belongs to a profile bundle (the README states it is for the official plugin system after 0812): after being loaded into a certain profile, the composition layer will insert a line id: git-identity. The GitHub topic is marked dsh-plugin. As of August 18, 2026, both the directory page and GitHub API show 7 stars. There is no LICENSE file in the repository root, and the license field of the GitHub API is empty, so the license is not declared in the repository for now.
It does not solve the problem of “helping agents write better commit messages”, but rather: all git commits initiated from any path in the DSH process will have their author and committer fall into the same set of parsed identities.
Core Features¶
Override git config with environment variables¶
When Git parses the author identity, the priority of GIT_AUTHOR_NAME, GIT_AUTHOR_EMAIL, GIT_COMMITTER_NAME, GIT_COMMITTER_EMAIL is higher than -c user.name=..., the local repository configuration, and git config --global. The plugin writes the parsed results into these four environment variables of the current process in apply().
Both the README and the source code state that the subprocess layer of DSH will bring process.env (credentials will be removed) when starting each bash child process. Therefore, git commit using the bash tool in the session will inherit this set of variables. The source code comments clearly state that even if a session explicitly passes -c user.name=..., the environment variables are still higher in priority, and repo-local / global configurations cannot override them.
Identity parsing follows a fixed order¶
Each source must provide both name and email, without either one being missing. The priority from high to low is:
1. Plugin configuration { name, email }: explicitly fixed, usable even when gh is not logged in.
2. gh CLI logged-in account: call gh api user, take login as the name, and spell the email as {id}+{login}@users.noreply.github.com.
3. Existing GIT_AUTHOR_NAME / GIT_AUTHOR_EMAIL when starting DSH. The plugin will ignore the value it injected last time to avoid treating its own output as external input during HMR reload.
4. git config --global user.name / user.email as fallback.
If none can be parsed, only an alarm will be issued and no injection will be performed. Both the source code and the README state that “identity will never be fabricated out of thin air”. A 8-second timeout is set for gh api user to fail quickly when gh is not installed, not logged in, or there is a network abnormality, without slowing down DSH startup.
Idempotent write-back to global configuration¶
In-process injection only covers DSH child processes. The plugin will also synchronize the same set of identities back to git config --global: only write when the global user.name / user.email is missing or inconsistent with the parsed results. This way, normal terminal commits outside the plugin process can also be aligned. Failure to write will only trigger an alarm without affecting the already injected environment variables.
The loading timing is every time DSH starts, and every time HMR reloads. The implementation is pure ESM, index.mjs has zero dependencies, and the README states that no build is required to modify the entry file.
Installation and Activation¶
The installation command given on the directory page shall prevail in the original text, run it in the DeepSeek Harness terminal:
dsh plugin add github:LoserFox/dsh-git-identity
For reproducible installation, the directory page recommends fixing the commit hash:
dsh plugin add github:LoserFox/dsh-git-identity#commit
Replace commit with the actual commit SHA in the repository. The official documentation also uses git sources like github:owner/repo to install bundles; pnpm will pull the source code instead of built artifacts. This plugin has no build steps, but the repository code may still be executed during installation. The directory page clearly states: the plugin runs with the permissions of the current dsh process, and you should check the source code repository and license before installing.
The README adds the installation method by profile, suitable for different startup combinations such as web / headless:
dsh plugin --profile web add /path/to/dsh-git-identity
dsh plugin --profile headless add /path/to/dsh-git-identity
Replace the local checkout path with the actual situation of your machine. After installation, you need to restart the DSH process of the target profile: the README states that composition layer changes do not participate in HMR hot updates. Verify whether the composition layer is attached:
dsh --profile web --dump-config | grep git-identity
The lines inserted by cordis.patch.yml are id: git-identity and name: '@loserfox/git-identity'. If you can see this layer in the dump result, it means the bundle has been added to the profile.
Typical Usage¶
By default, when name / email is not configured, as long as the local gh is logged in, the plugin will print something similar in the startup log:
[git-identity] git commit identity fixed as <login> <<id>+<login>@users.noreply.github.com> (source: gh CLI logged-in account)
After that, git commit in the DSH session will carry this set of authors. If you do not want to rely on gh, or need to pin the company email address, add config to this line in the bundle’s patch according to the README:
- insert:
- id: git-identity
name: '@loserfox/git-identity'
config:
name: LoserFox
email: 57448027+LoserFox@users.noreply.github.com
The above email is an example in the README, corresponding to the GitHub noreply address of user LoserFox. Just replace it with your own name / email. The official documentation reminds: the layers applied later will replace the entire config line, and user-side overrides should be written in the profile’s own cordis.patch.yml, do not modify the files in the package.
When parsing fails, the log will be:
[git-identity] Failed to resolve the git identity of the environment itself (requires gh login, GIT_AUTHOR_NAME/GIT_AUTHOR_EMAIL or git config --global user.name/user.email), skipping injection
At this time, the commit will still use the original git configuration, and the plugin will not fill in a fake author.
Applicable Scenarios and Notes¶
These scenarios are suitable:
- Agents often act as git commit / git commit --amend, and do not want the author to become DSH Agent or a placeholder name changed in a certain session.
- Commits inside DSH and ordinary terminal commits on the same machine need to be aligned, and it is acceptable for the plugin to write back to git config --global when necessary.
- Commits need to be associated with a GitHub account, and you want to use noreply addresses such as id+login@users.noreply.github.com for emails.
Before using, you should be aware of several boundaries:
- The plugin runs with the permissions of the current dsh process, and will execute index.mjs during installation and loading. It will call gh api user and may modify the local git config --global. Do not install it when multiple users share the same global configuration, or when you do not want the tool to modify the global identity, or first pin it in the plugin configuration and then evaluate the write-back behavior.
- The repository does not declare a license. The directory page states that it is open source in the community, and you can view the source code and install it for free, but you should confirm the license terms yourself before using it in compliance scenarios.
- The identity source must appear in pairs. If only name or only email is configured, this plugin configuration will not be adopted, and it will continue to look for gh / environment variables / global ones.
- When parsing gh identity, the display name uses the GitHub login, not the Name field in the profile.
- The community directory is not the official DeepSeek app store. The installation command shall prevail on the directory page; fixing the commit and reading the source code first is more stable than directly following the latest main.
Summary¶
dsh-git-identity centralizes “whose name should be used for git commits in DSH” into one parsing at startup: it tries configuration, gh CLI, startup environment variables, and global git configuration in order, writes them into environment variables, and writes back to global if necessary. It does not add new git tools, nor does it modify the commit content, it only ensures that the author field will no longer be misled by temporary -c or configuration changes in the session.
Directory page: https://deepseek-harness-plugin.com/zh-CN/plugins/dsh-git-identity/
GitHub: https://github.com/LoserFox/dsh-git-identity