dsh-github-auth: Manage Local GitHub CLI Authorization in DSH

Introduction

When building agents or doing automation development in DeepSeek Harness (DSH), you often need to connect to GitHub: pulling private repositories, using the API, or confirming whether local Git push is available. The common approach is to separately install the GitHub CLI (gh), run gh auth login in the terminal, and track which credentials are currently being used outside of DSH. The DSH community splits capabilities into plugins; oliblue-evan/dsh-github-auth (package name dsh-liao-github) consolidates “preparing gh, web login, viewing accounts and permissions, switching/logging out, SSH and repository read-only checks” into the plugin page and global settings, preferring to reuse the existing local gh, and does not separately store full tokens or hand full tokens to the UI.

What Is This

Maintainer oliblue-evan, category admin-security. The plugin manages local GitHub CLI authorization on github.com from the DSH plugin page and settings page: viewing the current account, verification results, scopes, credential source and Git protocol; adding or re-authorizing via gh’s official web flow; switching the current account, locally logging out a specified account; read-only checks of SSH identity and API write permissions for a specified repository; opening GitHub app authorization and SSH key management pages. The first version does not manage GitHub Enterprise hosts.

The host requires Node 18+; the client has no additional runtime npm dependencies. In the current materials, the package version is 0.3.1, license MIT.

Core Features

Accounts & Authorization

  • The overview card displays a local letter avatar, authorization status, credential source, Git protocol and readable permission labels; raw scopes are retained in the hint.
  • Uses gh’s official web login: displays a one-time code, the authorization entry point and waiting state, supports canceling the wait; login waiting is up to 15 minutes.
  • Switching the current account or locally logging out a specified account requires confirming the scope of impact; local logout only removes gh login configuration and locally stored credentials for that account; remote tokens and SSH must be managed separately on the official GitHub pages.
  • If environment variables GH_TOKEN / GITHUB_TOKEN take priority in controlling authorization, local account change-related features will be disabled; you need to manage the variables in the original startup environment.

Tool Preparation (0.3.x)

When gh is missing, you can “one-click prepare the tool”: downloads the official stable release of GitHub CLI according to OS/architecture, verifies the official SHA-256 manifest, then extracts and checks the version; installs to ~/.local/bin/gh (on Windows, gh.exe), does not install package managers, does not require administrator privileges, does not modify PATH, does not overwrite existing files. Cancel and retry are supported; after manual installation, click “I’ve installed it, re-detect” — no need to restart DSH. Supports macOS, Linux, and Windows x64 / ARM64 official portable packages.

SSH & Repositories

  • Separately checks SSH identity; read-only checks the API write permissions of the specified repository, and explains that branch protection and SSH may still affect Git push.
  • The SSH check does not accept new host keys; you need to configure and verify GitHub host fingerprints beforehand; the SSH identity may differ from the current gh account.

Security & Boundaries (Summary)

  • Login authorization is handled by gh, usually requesting repo / read:org / gist; the plugin does not receive passwords, does not additionally set scopes, does not upload or generate SSH keys, does not rewrite Git protocols or git credential helpers.
  • The local web API restricts origins; modifying operations must be POST JSON, carry the page nonce and explicitly confirm; does not use shell parameter concatenation.
  • The plugin runs with the current DSH process privileges; before installation, you should review the GitHub repository source code and license yourself. The community directory SkillHub has no official affiliation with DeepSeek / HiThink.

Installation & Activation

Add the plugin to the DSH profile (the original command from the materials is as follows — do not construct it yourself based on the directory name):

dsh plugin --profile desktop add github:oliblue-evan/dsh-liao-github

After completion, open Plugins → GitHub Authorization in DSH, or Settings → GitHub Authorization — both places show the same interface.

Typical Usage

  1. First use: If the tool is missing, click “One-click prepare tool”; after completion, click “Connect GitHub account”; if gh already exists, skip preparation; if a local gh account already exists, go directly to the overview.
  2. Web login: After reading the permission description, start the web login, enter the one-time code in the terminal/interface, confirm the account and permissions on the GitHub page; after completion, the interface automatically displays the account.
  3. Manual gh installation: Expand the backup instructions, install according to the GitHub CLI official documentation, then click “I’ve installed it, re-detect”. On Windows etc., if the terminal PATH does not include the user tools directory, other programs may need to call gh with the full path; the plugin itself can locate the installed gh.
  4. Daily maintenance: Top-of-page refresh and add account; SSH and repository checks show status and errors separately, can be retried; remote authorization revocation, SSH key entry and CLI diagnostics are in “Advanced options”; completely revoking GitHub CLI app authorization may affect other devices — confirm on the official pages in the end.

Applicable Scenarios & Notes

Suitable for: developers already developing under the DSH desktop profile, who want to uniformly manage gh multiple accounts and authorization status on the local machine, and quickly perform SSH / repository API permission self-checks.

Notes:

  • Only manages github.com; Enterprise is not listed on this page.
  • Local logout and switching also take effect for other tools sharing the same gh configuration; the plugin is not an independent authorization copy.
  • Disclosed network access includes github.com, api.github.com, GitHub release resource domains, and ssh://git@github.com:22 etc.; network access is required, not offline mode.
  • Account status has about a 5-second cache; manual refresh can bypass it; normal pages do not poll periodically — only short-time polling during login waiting or tool preparation.

Conclusion

dsh-github-auth brings GitHub CLI installation guidance, web login, and local account view into DSH; credentials are still kept by gh, and the interface focuses on readable status and controlled local operations. Directory page: SkillHub - oliblue-evan/dsh-github-auth; source code and README: github.com/oliblue-evan/dsh-github-auth.

羽毛球分组比赛记分
小程序二维码

欢迎使用《羽毛球分组比赛记分》微信小程序

Xiaoye