Repository navigation
Closed as not planned
Description
Overview
Document how to set up per-session GitHub authentication for group chats with repository-specific access control.
Use Cases
- Family group: Access to only
username/family-recipesrepository - Business group: Access to organization repositories (e.g.,
company/*) - Personal projects: Full access to personal repositories
Prerequisites
- GitHub CLI installed in sandbox (see related issue)
GH_CONFIG_DIRconfigured to persist in workspace
Authentication Setup Workflow
Option 1: Fine-Grained Personal Access Tokens (Recommended)
Step 1: Create tokens with specific permissions
- Go to GitHub Settings → Developer settings → Personal access tokens → Fine-grained tokens
- Create separate tokens for each use case:
Family Token:
- Token name:
clawdbot-family-group - Repository access: Only select repositories →
username/family-recipes - Permissions:
- Contents: Read and write
- Issues: Read and write
- Pull requests: Read and write
Business Token:
- Token name:
clawdbot-business-group - Repository access: All repositories (or select organization)
- Permissions: (customize as needed)
Step 2: Authenticate each group session
Send a message in the family group:
Hey, can you run: gh auth login --with-token
Agent responds with instructions, you paste the family token.
Repeat for business group with business token.
Option 2: GitHub Apps (Advanced)
Create separate GitHub Apps with repository-specific installations:
- More granular control
- Better audit logging
- Requires GitHub App setup and installation
Verification Commands
Check current auth:
gh auth statusList accessible repos:
gh repo listTest repository access:
gh repo view username/family-recipes
gh issue list --repo username/family-recipesSecurity Considerations
-
Token Storage:
- Tokens stored in
~/.clawdbot/sandbox/<session>/.config/gh/hosts.yml - Standard filesystem permissions (root-owned)
- Not exposed to other sessions
- Tokens stored in
-
Token Rotation:
- Tokens should be rotated periodically
- Set expiration dates on fine-grained tokens
- Revoke and recreate if compromised
-
Audit Logging:
- GitHub tracks all API usage by token
- Review security logs regularly
Documentation Sections to Add
Create new doc file: docs/github-integration.md
Sections:
- Overview of per-session GitHub access
- Setting up fine-grained tokens
- Authentication workflow
- Repository access verification
- Token management and rotation
- Troubleshooting common issues
- Security best practices
Testing Checklist
- Document token creation process with screenshots
- Test authentication in family group session
- Test authentication in business group session
- Verify repository access isolation
- Document token revocation process
- Add troubleshooting section
Files to Create/Modify
docs/github-integration.md(new)docs/groups.md(add GitHub integration section)docs/security.md(add token storage security notes)README.md(add link to GitHub integration docs)
Related Issues
- Requires GitHub CLI in sandbox to be implemented first
Metadata
Metadata
Assignees
Labels
No labels
Type
Fields
Priority
None yet
Activity
UI: align tool call timeline row (openclaw#257)
Views openclaw#257-261: ServiceHealthDashboard (agent/piper), DataMas…