Skip to main content

GitHub Integration

Connect your GitHub accounts and organizations to CNAP for seamless repository access and automated deployments. Our GitHub App integration provides secure, scoped access to your repositories without requiring personal access tokens.

Benefits

  • Secure Authentication - GitHub App provides secure, scoped access without personal tokens
  • Team Collaboration - Share GitHub access across all workspace members
  • Multiple Sources - Connect both personal and organization accounts in one workspace
  • Automated Deployments - Deploy directly from GitHub with Nixpacks auto-detection
  • Granular Permissions - Control exactly which repositories are accessible

How It Works

1. Install GitHub App

When you connect a GitHub account or organization, CNAP requests permission to install our GitHub App. This creates a secure connection that doesn’t require storing personal access tokens.
CNAP Dashboard showing application catalog and marketplace

CNAP Dashboard - Start your GitHub integration journey

2. Select Repository Access

Choose which repositories to make available to your workspace. You can grant access to:
  • All repositories (current and future)
  • Selected repositories (specific repos only)
  • Public repositories only (for open source projects)

3. Workspace Integration

Once connected, all workspace members can:
  • Deploy applications from connected repositories
  • Access repository contents for building and deployment
  • View repository metadata and commit history
Successful GitHub App installation confirmation

Successful GitHub integration - Ready to deploy

Personal Accounts

Connect your personal GitHub account to access your individual projects and repositories.

Benefits

  • Individual Projects - Deploy your personal side projects and experiments
  • Open Source - Contribute to and deploy open source applications
  • Learning - Practice with your own repositories without organizational constraints
  • Portfolio - Showcase your work through deployed applications

Use Cases

  • Personal blogs and websites
  • Side project APIs and services
  • Open source contributions
  • Learning and experimentation

Organizations

Connect GitHub organizations to enable team collaboration and access to shared repositories.

Benefits

  • Team Access - All workspace members can use organization repositories
  • Shared Resources - Collaborate on company projects and client work
  • Scalable - Add multiple organizations to one workspace
  • Flexible - Mix personal and organizational repositories

Use Cases

  • Agencies - Connect multiple client organizations
  • Companies - Access internal tools and applications
  • Open Source - Contribute to organization projects
  • Consulting - Manage different client repositories

Security & Permissions

  • Repository contents - For building and deployment purposes
  • Repository metadata - Name, description, language, and structure
  • Commit history - For deployment tracking and versioning
  • Branch information - To understand repository structure
  • Private repository contents - Unless explicitly granted access
  • User personal information - Email, profile data, or private details
  • Organization settings - Billing, member management, or admin settings
  • Other applications - Access to other GitHub Apps or integrations
  • Repository access - Only repositories you explicitly grant
  • Read-only by default - Cannot modify your code or settings
  • Temporary tokens - Short-lived access tokens for security
  • Revocable - You can revoke access at any time

Multiple Installations

CNAP supports multiple GitHub App installations within a single workspace, enabling flexible access patterns:

Supported Configurations

  • Multiple Personal Accounts - Add different team members’ personal accounts
  • Multiple Organizations - Connect various client or company organizations
  • Mixed Access - Combine personal and organizational repositories
  • Team Collaboration - All workspace members can use all connected installations

Example Scenarios

Workspace: "My Consulting Business"
├── Personal Account (alice-dev)
├── Client A Organization (acme-corp)
└── Client B Organization (startup-xyz)
Access repositories from all sources in one workspace.
Workspace: "Engineering Team"
├── Company Organization (mycompany)
├── Open Source Org (mycompany-oss)
└── Team Lead Personal (lead-dev)
Combine company resources with open source contributions.
Workspace: "Digital Agency"
├── Agency Organization (digital-agency)
├── Client A (client-a-corp)
├── Client B (client-b-inc)
└── Partner Org (partner-company)
Manage all client projects from one workspace.

Repository Deployment

Once GitHub accounts are connected, you can deploy applications directly from repositories:

Automatic Detection

CNAP uses Nixpacks to automatically detect your application type and build configuration:
  • Node.js - Express, Next.js, SvelteKit, Remix, Nuxt
  • Python - Django, FastAPI, Flask
  • Go - Gin, Echo, Chi
  • Ruby - Rails, Sinatra
  • Java - Spring Boot, Quarkus
  • Rust - Actix, Rocket, Axum
  • PHP - Laravel, Symfony

Deployment Process

  1. Select Repository - Choose from connected GitHub repositories
  2. Auto-Detection - Nixpacks analyzes your code and determines build process
  3. Build & Package - CNAP builds and packages your application
  4. Deploy - Deploy to your selected clusters
  5. Configure - Set pricing and make available as a product

Best Practices

Start Simple - Begin with one GitHub account and expand as needed
Repository Access - Only grant access to repositories you want to deploy from CNAP

Security Recommendations

  • Principle of Least Privilege - Grant access only to necessary repositories
  • Regular Review - Periodically review connected accounts and permissions
  • Team Coordination - Coordinate with team members before adding new installations
  • Access Management - Remove access for team members who leave the workspace

Collaboration Tips

  • Clear Naming - Use descriptive names for different GitHub installations
  • Documentation - Document which repositories are used for which products
  • Access Patterns - Establish clear guidelines for repository access
  • Regular Cleanup - Remove unused installations to maintain security

Troubleshooting

  • Verify the repository is included in the GitHub App installation
  • Check that the repository is not private (unless explicitly granted access)
  • Ensure the GitHub App has the necessary permissions
  • Try reconnecting the GitHub account
  • Check that your repository has a supported language/framework
  • Verify all dependencies are properly declared
  • Review build logs for specific error messages
  • Consider adding a Dockerfile for custom build requirements
  • Verify you have access to the repository
  • Check that the GitHub App installation is still active
  • Ensure the repository hasn’t been moved or deleted
  • Try refreshing the GitHub connection

Next Steps