Skip to main content
CodePlanet Docs

Github Integration

Connect your GitHub account to sync repositories directly with the CodePlanet Cloud IDE. Edit files, commit changes, and manage your projects without leaving the platform.

Why Connect GitHub?

  • Seamless workflow — Edit your repos in the Cloud IDE
  • Automatic sync — Changes save directly to GitHub
  • Familiar tools — Use the Git workflow you already know
  • Secure access — OAuth 2.0 with minimal permissions

Connecting Your Account

Step 1: Open the IDE

Navigate to /ide to access the Cloud IDE.

Step 2: Click Connect GitHub

Click the Connect GitHub button in the sidebar. A popup window will open.

Step 3: Authorize CodePlanet

In the popup, sign in to GitHub and authorize CodePlanet to access your repositories.

Permissions requested:

  • repo — Read and write access to repositories
  • user:email — Read access to email addresses

Step 4: Select a Repository

After authorization, you'll see a list of your repositories. Choose the one you want to work on.

Step 5: Start Coding

The repository files will load in the File Explorer. You're ready to code!

Disconnecting GitHub

To disconnect your GitHub account:

  1. Go to /settings/integrations
  2. Find the GitHub section
  3. Click Disconnect

Note: Disconnecting will remove your stored access token but won't affect your GitHub account or repositories.

Working with Repositories

Viewing Files

  • All repository files appear in the left sidebar
  • Click a file to open it in the editor
  • Folders can be expanded/collapsed

Editing Files

  • Make changes in the Monaco editor
  • Press Ctrl+S / Cmd+S to save
  • Changes sync to GitHub automatically

Creating New Files

  1. Right-click in the File Explorer
  2. Select New File
  3. Enter the file name with extension
  4. Press Enter to create

Committing Changes

When you save a file:

  1. The file content is uploaded to GitHub
  2. A commit is created with an auto-generated message
  3. The change appears in your repository's history

Switching Repositories

To work on a different repository:

  1. Click the repository name in the sidebar header
  2. Click Change Repository
  3. Select a new repository from the list

Repository Requirements

For best results, ensure your repository:

  • Is not empty (has at least one file)
  • Is not archived
  • You have push access (for saving changes)

Troubleshooting

"Repository not found" error

  • Ensure the repository exists and is not deleted
  • Check that you have access to the repository
  • Try disconnecting and reconnecting GitHub

"Permission denied" error

  • Verify your GitHub token hasn't expired
  • Ensure you have write access to the repository
  • Try reconnecting your GitHub account

Files not appearing

  • Check if the repository has any files
  • Ensure you're viewing the correct branch (default: main/master)
  • Try refreshing the page

Changes not syncing

  • Check your internet connection
  • Verify the file isn't too large (max 25 MB)
  • Ensure the repository isn't archived

Security

Token Storage

  • Your GitHub access token is stored securely in our database
  • Tokens are encrypted at rest
  • Tokens are never exposed to the client

Minimal Permissions

We request only the permissions necessary for IDE functionality:

  • Repository access for reading/writing files
  • Email access for account verification

Revoking Access

You can revoke CodePlanet's access at any time:

  1. Go to GitHub Settings > Applications
  2. Find CodePlanet in the list
  3. Click Revoke

Best Practices

Use Feature Branches

Create branches for new features to keep your main branch clean:

git checkout -b feature/new-feature

Write Meaningful Commit Messages

While we auto-generate commit messages, you can customize them in Settings > IDE > Commit Messages.

Keep Files Organized

Use a consistent folder structure:

src/
  components/
  pages/
  utils/
tests/
docs/

Regular Syncs

Save frequently to keep your GitHub repository up to date with your changes.