GitHub
Every agent can have its own GitHub account and its own name on its commits, without you pasting a token. One agent can push as your work account while another pushes as a bot account, and neither ever sees the other's credentials.
Connecting an agent
- Open the agent's Settings, then Access, and press Connect GitHub.
- DAC shows a short one-time code. Press Open GitHub.
- Enter the code on github.com and approve. The agent is connected, and DAC records the account's name and email as the agent's commit identity.
This is GitHub's device sign-in, the same way the gh command line signs in. GitHub hands the credential to DAC directly, and DAC stores it encrypted. You never see or handle it, and the agent never holds it either: DAC supplies it to git at the moment git needs it.
The approval goes to whichever account your browser is using
To connect two agents to two different GitHub accounts, switch accounts in your browser between the two sign-ins. The dashboard shows which account each agent ended up with, so a mistake is easy to spot.
Once one agent is connected, other agents are offered the same account with one click, as a Use button with the account's name, next to Connect a different account. Ten agents on one GitHub account cost one approval, not ten.
One-time setup: register DAC with GitHub
Until this is done, an agent's GitHub section says "GitHub sign-in is not set up for this installation yet." Before the Connect GitHub button appears, DAC needs to be registered with GitHub once. Whoever runs DAC does this:
- On GitHub, open Settings, then Developer settings, then OAuth Apps, and choose New OAuth App.
- Give it any name and homepage. Tick Enable Device Flow. The callback address is not used, so
http://127.0.0.1is fine. - Copy the Client ID that GitHub shows. It is public, not a secret.
- Put it in
~/.dac/config.json, then restart DAC:
{ "githubClientId": "<the client ID>" }The DAC_GITHUB_CLIENT_ID environment variable works too.
Limiting what an agent can reach
A GitHub sign-in gives the agent everything that account can reach. The practical way to limit an agent is to give it its own GitHub account, such as a bot account, that has access only to the repositories it should touch.
SSH keys
Each agent also has its own SSH settings and keys, so git clone [email protected]:… inside an agent uses that agent's keys, never yours.