How to Create a GitHub API Token for Your AI Agent
Preface
Sometimes, you want the Agent to help you push the project to Github, and then use Github's action to run the build.
https://zelikk.blogspot.com/2026/06/forkgram-tdesktop-github-action-win10-amd64.htmlSometimes, you want the Agent to save a copy of the proxy node subscription text to a Github gist
All of the above operations require a prerequisite: you have set up a Github API token for the Agent to use.
Github's API token can be set with repo, workflow, gist permissions. Generally that's enough.
* The following practical solutions were all completed under the condition of Hermes connecting to tencent/hy3:free
Practice 1
If your Agent runs on your own computer.
You can open the Chrome browser, log into your Github account. Then tell your Agent,
The current page in the browser is already logged into a Github account, please continue the operation and create an API token with repo, workflow, gist permissions
Then you can save this token separately. You can also tell the Agent to save it in its own .env.
Practice 2
If your Agent runs on a 2G RAM VPS.
You can tell your Agent,
Launch the browser, let me VNC in to operate and log into a Github account.
After you finish logging in, tell your Agent,
The browser is already logged into a Github account, you take over and continue the operation, and create an API token with repo, workflow, gist permissions
Then you can save this token separately. You can also tell the Agent to save it in its own .env.
Practice 3
If your Agent runs on a 1G RAM VPS.
In this case, it would be quite a struggle for the Agent to open a browser.
You can let the Agent act as a "coach" to guide you through the specific operations.
I want to create an API token on Github with repo, workflow, gist permissions
Please guide me step by step on how to operate
During this process, if you encounter any problems, take a screenshot and ask the Agent, "Where should I click?"
Practice 4
Old-school manual method
Log into your Github account
Top-right corner avatar - Settings
Scroll down the page - Developer settings
Pull down Personal access tokens - Tokens (classic)
Top right corner dropdown Generate new token - Generate new token (classic)
Enter a name for the token (whatever you like)
Check repo, workflow, gist
Generate token button
The token will only be shown once, save it yourself
========
Postscript
Note that this API token's operational permissions are equivalent to logging in with your username and password. So I suggest you not use a relay station.
To be more conservative, don't use your main Github account.
========