Custom GitHub App Setup
Create Your Own GitHub App for SpikePrimeGit
📖 Overview
⚠️ Advanced Setup
This guide is for users who want to create their own GitHub App instead of using the official SpikePrimeGit app from the GitHub Marketplace.
Most users should use the official app. Only follow this guide if:
- The SpikePrimeGit Marketplace app is not yet available
- You want to use a custom app for organizational/security reasons
- You're comfortable with GitHub App configuration
What You'll Accomplish
By the end of this guide, you will have:
- Created your own GitHub App
- Configured it with the correct permissions
- Connected SpikePrimeGit extension to use your custom app
- Successfully synced a project to GitHub
Time Required: 20-30 minutes
🤔 Why Create a Custom GitHub App?
When to Use a Custom App
✅ Good Reasons:
- Marketplace App Not Available: The official SpikePrimeGit app hasn't been approved yet
- Organizational Policy: Your organization requires apps to be managed internally
- Custom Branding: You want the app to appear under your organization's name
- Testing/Development: You're developing custom features or testing modifications
❌ Not Necessary If:
- The official SpikePrimeGit app is available on GitHub Marketplace
- You're a student or individual user just getting started
- You want the simplest setup possible
📋 Prerequisites
Before you begin, make sure you have:
- GitHub Account: A GitHub account (personal or organization)
- Chrome Extension Installed: SpikePrimeGit extension installed from the Chrome Web Store
- Repository Created: At least one GitHub repository where you'll save projects
- Basic GitHub Knowledge: Familiarity with GitHub basics (repositories, branches)
⚠️ Important Notes
- OAuth App vs GitHub App: This guide creates a GitHub App (not an OAuth App). GitHub Apps are the modern, recommended approach.
- Permissions: You'll need permission to create apps in your account or organization
- Callback URL: The extension uses a specific callback URL that must be configured correctly
🛠️ Step 1: Create Your GitHub App
Navigate to GitHub App Settings
Choose where to create your app:
Option A: Personal Account
- Go to GitHub Settings → Developer settings → GitHub Apps
- Click "New GitHub App"
Option B: Organization Account
- Go to your organization settings
- Navigate to Developer settings → GitHub Apps
- Click "New GitHub App"
Configure Basic Information
Fill in the basic app information:
GitHub App name:
SpikePrimeGit-CustomApp
Or any name you prefer (must be unique across GitHub)
Homepage URL:
https://github.com/varunmehta/spike-prime-git
Or link to your own documentation
Description:
Sync LEGO SPIKE Prime projects to GitHub automatically
Configure Callback URL
Callback URL:
https://<YOUR-EXTENSION-ID>.chromiumapp.org/
Replace <YOUR-EXTENSION-ID> with your actual extension ID
How to Find Your Extension ID:
- Open Chrome and go to
chrome://extensions/ - Enable "Developer mode" (toggle in top-right)
- Find SpikePrimeGit in the list
- Copy the ID (long string like:
abcdefghijklmnopqrstuvwxyz123456)
ldiklhfinipoikhmfbnamjklkigcppoe, your callback URL would be:https://ldiklhfinipoikhmfbnamjklkigcppoe.chromiumapp.org/
Configure Webhook Settings
Webhook:
☑️ Uncheck "Active" (webhooks not needed for this extension)
Configure Permissions
Set the following permissions under "Repository permissions":
Contents: Read and write
Required to read repository files and create commits
Metadata: Read-only
Automatically granted - required to list repositories
Configure User Permissions
Under "User permissions", no additional permissions are required. Leave all as "No access".
Configure Installation Options
Where can this GitHub App be installed?
Choose based on your needs:
- Only on this account: For personal use only
- Any account: If you want to share with others (advanced)
Recommendation: Select "Only on this account" for simplicity
Create the App
- Click "Create GitHub App" at the bottom
- You'll be taken to your new app's settings page
🎉 App Created!
Your GitHub App is now created. Next, we need to generate credentials for the extension.
Generate Client Credentials
On your app's settings page:
- Scroll down to "Client secrets" section
- Click "Generate a new client secret"
- IMMEDIATELY COPY the client secret (you won't be able to see it again!)
- Also note your Client ID (visible at the top of the page)
Keep These Safe:
Client ID: Iv1.xxxxxxxxxxxxxxxx
Client Secret: xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
Install the App to Your Account
- On your app's settings page, click "Install App" in the left sidebar
- Click the Install button next to your account/organization
- Select repositories to grant access to:
- All repositories: App can access all your repos
- Only select repositories: Choose specific repos (recommended)
- Click "Install"
✅ Installation Complete!
Your GitHub App is now installed and ready to use. Next, we'll configure the extension.
⚙️ Step 2: Configure the Extension
Open Extension Options
- Click the SpikePrimeGit extension icon in Chrome
- If you're already connected, click "Disconnect" first
- Right-click the extension icon
- Select "Options" or go to
chrome://extensions/and click "Details" → "Extension options"
Enable Custom GitHub App Mode
In the extension options page:
- Find the "Use Custom GitHub App" section
- Toggle "Enable Custom GitHub App" ON
Enter Your App Credentials
Enter the credentials you saved earlier:
Client ID:
Client Secret:
Save and Connect
- Click "Save Settings"
- Close the options page
- Click the extension icon again
- Click "Connect to GitHub"
- Authorize the connection when prompted
🎉 Connected!
Your extension is now connected to your custom GitHub App!
✅ Step 3: Test Your Setup
Verify Everything Works
1. Check Connection Status
- Click the extension icon
- Verify you see "Connected as [your-username]"
- Verify you can see your repositories in the dropdown
2. Configure Settings
- Select a repository from the dropdown
- Select a branch (usually "main")
- Set a project path (e.g., "projects/")
- Click "Save Settings"
3. Test Sync
- Open SPIKE Prime software
- Create or open a project
- Make a small change and save (Ctrl+S or Cmd+S)
- Find the SpikePrimeGit card on the page
- Enter a commit message (e.g., "Test sync")
- Click "Sync to GitHub"
- Wait for the success notification
4. Verify on GitHub
- Go to your GitHub repository
- Navigate to the project path you configured
- Verify your .llsp3 file is there
- Check the commit message matches what you entered
🎊 Success!
If you see your project file on GitHub, everything is working correctly! You're now ready to use SpikePrimeGit with your custom GitHub App.
🔧 Troubleshooting
"Invalid callback URL" Error
Problem: Authentication fails with callback URL error.
Solution:
- Double-check your callback URL in GitHub App settings
- Make sure it matches:
https://<extension-id>.chromiumapp.org/ - Verify your extension ID at
chrome://extensions/ - Ensure the URL ends with a trailing slash (
/)
"Unauthorized" or "403 Forbidden" Errors
Problem: Extension can't access repositories.
Solutions:
- Verify your app is installed to your account (GitHub Settings → Applications → Installed GitHub Apps)
- Check that the app has access to the repository you're trying to use
- Verify your Client ID and Client Secret are correct
- Make sure you granted Contents: Read and write permission
- Try disconnecting and reconnecting the extension
Client Secret Lost or Compromised
Problem: You lost your Client Secret or it was exposed.
Solution:
- Go to your GitHub App settings
- Scroll to "Client secrets"
- Click "Revoke" on the compromised secret
- Click "Generate a new client secret"
- Update the extension options with the new secret
- Reconnect the extension
Want to Switch Back to Official App
When the official SpikePrimeGit app becomes available:
- Click the extension icon
- Click "Disconnect"
- Go to extension options
- Toggle "Enable Custom GitHub App" OFF
- Click "Save Settings"
- Click the extension icon and "Connect to GitHub"
- You'll now use the official app
Need More Help?
- Check the main Troubleshooting Guide
- Review GitHub's documentation on creating apps
- Ask for help on the GitHub repository
📚 Related Documentation
- Main Documentation - Complete setup and usage guide
- Getting Started Guide - For beginners
- Authentication & Storage - How data is stored
- Privacy Policy - Privacy information