answered from live GitHub & Hugging Face data

How do I create a separate GitHub account for my custom AI coding agent like QwenLM?

MaintSlowing · 8mo ago
Stars0
Issues0 open

Use a GitHub App, not a second account, for a custom agent. A machine account is allowed, but GitHub limits you to one.

I could not retrieve live maintenance signals for QwenLM/qwen-code because the GitHub lookup was rate-limited. This answer covers the account rules and identity options only.

What the Terms of Service allow

GitHub's Terms of Service say the following about machine accounts:

Several agents that share one machine account all act as the same user. That does not give each agent its own identity.

Options compared

Option Separate identity per agent? Token lifetime Repo scope Fit
GitHub App (recommended) Yes. Each app is its own actor. Installation tokens expire after 1 hour, per GitHub docs You can limit tokens to chosen repositories and permissions. Best for one or more agents
Machine account Only one. A second one exceeds the limit. Depends on the token you create Depends on the token Good for one agent
Your personal credentials No. Actions appear as you. Depends on the token Depends on the token Avoid for agents

Steps: create a GitHub App for your agent

  1. Register a new GitHub App under your account or organization settings.
  2. Set only the permissions the agent needs, such as Contents and Pull requests.
  3. Install the app on one repository, not on all repositories.
  4. Generate a private key and store it in your agent's secret store.
  5. At run time, sign a JWT and request an installation access token for that repository.
  6. Pass the token in the Authorization: Bearer header.

Per the installation token docs, API requests made with an installation token are attributed to the app. The token also works for HTTP Git access with the Contents permission.

Steps: create a machine account (if you need a named user)

  1. Create a new GitHub account with a mailbox you control.
  2. Turn on two-factor authentication.
  3. Use it only for automated tasks.
  4. Add it to the repositories it needs.
  5. Keep the account to one. You already hold a free personal account.

Recommendation

Choose a GitHub App if you run more than one agent or want short-lived, repo-scoped tokens. Choose a machine account only if your project needs an actual user name for the agent.

If you want each agent's commits to show the agent as author and name the accountable human, githug does this. Its hug init --repo owner/repo command sets it up for Claude Code, Codex, Cursor, or any agent that runs git. Each agent gets its own key, which mints one-hour tokens for one repository. It is in beta and free for now.

docs.github.com/en/site-policy/github-terms/github-terms-of-servicedocs.github.com/en/apps/creating-github-apps/about-creating-github-apps/about-creating-github-appsgithub.com/OC15141355/shoyu-clidocs.github.com/en/apps/creating-github-apps/authenticating-with-a-github-app/generating-an-installation-access-token-for-a-github-appdocs.github.com/en/apps/creating-github-apps/authenticating-with-a-github-app/authenticating-as-a-github-app-installation
Answered live from GitHub & Hugging Face · anthropic/claude-haiku-5.5 · 11/3/2026

Ask your own open-source question →