Overview
This guide explains how to create and configure a GitHub App for Orphelix.Step 1: Create GitHub App
For Personal Account
Navigate to GitHub Settings
Click New GitHub App
For Organization
Go to Organization Settings
Click New GitHub App
Step 2: Configure Basic Settings
Fill in the following fields in the GitHub App creation form:Step 3: Set Permissions
Under Repository permissions, configure the following:- Contents
- Pull requests
- Metadata
Read and writeRequired for:- Reading YAML files from repository
- Creating/updating files for PRs
Summary of Permissions
Step 4: Create the App
Click Create GitHub App
Confirm creation
Step 5: Install the App
Click Install App
Choose account
Select repositories
- All repositories - Grant access to all current and future repos
- Only select repositories - Choose specific repos (recommended)
Click Install
Step 6: Get Credentials
You need three credentials to configure Orphelix:1. App ID
Go to app settings
Find App ID
123456)Copy App ID
.env.local2. Client ID & Client Secret
Find Client ID
Generate Client Secret
Copy immediately
3. Private Key
Scroll to Private keys section
Generate key
Save .pem file
.pem file will download automaticallyStep 7: Configure Environment Variables
Create or update.env.local in your Orphelix project root:
Converting Private Key
- macOS/Linux
- Windows
Generating NEXTAUTH_SECRET
Step 8: Verify Installation
Start Orphelix
Open Settings
Click GitHub Integration
Click Login with GitHub App
Authorize
Select repository
Test YAML editor
Troubleshooting
App not showing in Settings
App not showing in Settings
- Environment variables not set correctly
.env.localnot loaded (restart dev server)- NEXTAUTH_SECRET not generated
Cannot read repositories
Cannot read repositories
- App not installed on repository
- Missing Contents permission
- Go to GitHub Settings → Applications → Installed GitHub Apps
- Click Configure on your app
- Verify repository access
Private key errors
Private key errors
- Private key format incorrect
- Missing BEGIN/END lines
- Extra quotes or escaping
- Ensure private key includes
-----BEGIN RSA PRIVATE KEY-----and-----END RSA PRIVATE KEY----- - Use double quotes around the entire key
- Preserve line breaks
Production Deployment
For production, update these values:Security Best Practices
Private Key Storage
Private Key Storage
- Never commit
.env.localto git - Store private key in secure secret manager (production)
- Rotate keys periodically
Repository Access
Repository Access
- Only grant access to necessary repositories
- Use “Only select repositories” instead of “All repositories”
- Review access permissions regularly
Token Management
Token Management
- Tokens are stored in HTTP-only cookies
- Automatic refresh every 8 hours
- Revoke access from GitHub when not needed