Synchronize an Insomnia project with Git

Uses: Insomnia
TL;DR

Create a remote Git repository and an Insomnia project with Git Sync. Select the Git provider and connect to the repository. In the project, click the button at the bottom of the left pane to see the Git Sync menu and push your changes.

Prerequisites

Download and install Insomnia.

When you create an Insomnia project with Git Sync, you can either add the repository now or later (if you’re using Insomnia 11.5 or later). If you want to add the repository when you create the project, you can either use an existing repository with Insomnia content or an empty repository.

Create a project

A Projects storage type isn’t fixed. If you have an existing cloud or local project, you can also update it to use Git Sync from the projects Settings option.

  1. In your Insomnia organization, click the + button under PROJECTS in the left pane.
  2. In the Project name field, name your project.
  3. In the Type field, click Git Sync.
  4. Select whether you want to clone the repository from GitHub, GitLab, or Git:

If your Git repository already contains Insomnia content, you will be prompted to import the content to your project. You can also create the Git Sync project now and add a repository later.

If the repository contains legacy Insomnia content prior to 11.0, Insomnia will convert this content to the new format introduced in newer versions.

Commit and push the content to your repository

Once you’ve created content or made changes to existing content in your project, you can push the changes to your repository:

  1. From the bottom of the left pane, click the name of the branch.
  2. Click Commit.
  3. Enter a commit message.
  4. Stage changes by clicking the + button next to the changes that you want to commit to the repository and click Commit.
  5. Click the name of the branch again and click Push 1 Commit.

Git status notifications appear at the bottom right corner of the window.

FAQs

If you can see only public repositories but not private repositories, review your GitHub App installation settings.

Insomnia uses the GitHub App integration. The app must be granted access to private repositories during installation.

To verify repository access:

  1. Navigate to Insomnia GitHub App.
  2. Click Configure.
  3. Select your account or organization.
  4. Under Repository access, confirm that:
    • All repositories is selected, or
    • The required private repositories are explicitly included.
  5. If you make changes, click Save.

After updating the installation settings, disconnect and reconnect GitHub in Insomnia if the repositories still don’t appear.

If you authenticate using a Personal Access Token (PAT), use a fine-grained PAT.

Navigate to Github Personal access tokens and ensure that the token is configured to allow access to the repositories you want to sync.

A 403 Forbidden error usually indicates that Insomnia does not have access to the target repository.

If you use GitHub, navigate to Github applications to ensure that the Insomnia GitHub App is installed and has access to the repository.

If you use a managed GitHub account that restricts GitHub App installation, use the Git tab and configure the repository with the generic Git workflow instead.

Help us make these docs great!

Kong Developer docs are open source. If you find these useful and want to make them better, contribute today!