AI & Agents

How to Setup and Use GitHub Copilot in IntelliJ IDEA

The official GitHub Copilot plugin integrates AI-powered completions directly into JetBrains IntelliJ IDEA, but most setup guides are written for VS Code and omit the JetBrains-specific steps. Learn how to configure global instruction files, resolve network proxy limits, and fix SSL trust issues inside the JetBrains Runtime environment. Then, see how Fast.io shared workspaces store and version these configurations for engineering teams.

Fast.io Editorial Team 10 min read
Configuring GitHub Copilot settings and custom instructions in IntelliJ IDEA.

How to Install GitHub Copilot in IntelliJ IDEA

IntelliJ IDEA remains the default IDE for most JVM work, but nearly every AI coding tutorial is written for Visual Studio Code. Setting up GitHub Copilot in IntelliJ is a different job: it depends on JetBrains-specific settings paths, custom VM options, and configuration files that have no VS Code equivalent. The official plugin integrates AI completions directly into the editor, providing autocomplete suggestions and chat assistance as you write code.

To install the plugin, open IntelliJ IDEA and access the settings. You can do this by using the keyboard shortcut Ctrl+Alt+S on Windows and Linux, or Cmd+, on macOS. From the left-hand sidebar, click on Plugins. Select the Marketplace tab at the top of the pane, type 'GitHub Copilot' into the search field, and click the Install button next to the official plugin. Once the installation process completes, click the prompt to restart your IDE to load the plugin.

After IntelliJ restarts, you must authenticate your GitHub account to enable code completions. Look for the Copilot icon in the status bar in the bottom right corner of the editor, or open the GitHub Copilot tool window in the side panel. Click the status icon and select the log in option. The IDE will display a device activation code and open a browser window pointing to the GitHub authorization page. Enter the activation code on the website and confirm the permissions. When the browser confirms that the setup is complete, return to IntelliJ. The status icon will show that the connection is active, and you can now use Copilot to generate suggestions.

Configuring Custom Rules for GitHub Copilot in JetBrains

Standard guides for GitHub Copilot in IntelliJ IDEA omit the configurations for custom coding instructions, leaving a gap for developers who must follow specific style guides or design patterns. Customizing how Copilot generates code helps keep suggestions aligned with your project requirements. You can configure these guidelines at two levels: globally across all repositories on your machine, or locally within a specific project. Setting up these files prevents the AI from suggesting deprecated methods, wrong import paths, or formatting styles that conflict with your team rules. If you run autonomous agents alongside your IDE toolset, you can connect them to storage for agents to maintain consistent configurations.

To set up global rules, you must create a file named global-copilot-instructions.md in your user configuration directory. The path depends on your operating system. For macOS, create the file in your home folder at the location ~/.config/github-copilot/intellij/global-copilot-instructions.md. For Windows systems, save the file in your local app data folder at C:\Users\YOUR-USERNAME\AppData\Local\github-copilot\intellij\global-copilot-instructions.md. If the parent directories do not exist, create them manually. Write your guidelines in standard Markdown format, specifying preferences for naming conventions, comment styles, and coding standards. The plugin reads this global configuration file when loading, applying these instructions to all completion requests. For example, you can instruct the plugin to avoid suggesting raw types in Java or to prefer Kotlin coroutines over threads.

For project-specific rules, place a configuration file inside your repository. Create a folder named .github at the root of your project, and save a file named copilot-instructions.md inside it. In this file, write instructions tailored to the repository, such as using specific libraries, maintaining test coverage patterns, or ignoring legacy directories. The local file overrides your global configurations for that project, allowing you to switch between repositories with different architectural standards without changing your global settings. If you work on multiple projects with different Java versions, you can use these local files to instruct Copilot to restrict its syntax suggestions to Java 17 or Java 21, ensuring the generated code compiles correctly.

Fastio features

Manage your GitHub Copilot instructions in shared workspaces

Set up a shared, intelligent workspace to store custom instructions, certificates, and settings files for your entire development team. Start your 14-day trial to collaborate with shared file context.

How to Configure Network Proxies and VM Options in IntelliJ

Developers operating behind corporate firewalls or web filtering proxies often experience connection failures when the GitHub Copilot plugin tries to contact its authentication and telemetry servers. To resolve these network blocks, you can configure IntelliJ's built-in proxy settings or specify custom JVM options in the IDE configuration files. Without correct network configuration, the plugin remains offline, and the status bar icon displays a strike-through or a red warning light.

First, adjust the proxy configurations in the IntelliJ Settings. Open the Settings window, expand Appearance & Behavior, select System Settings, and click on HTTP Proxy. Select the Manual proxy configuration option, check the HTTP button, and enter the Host name and Port number of your proxy server. If your corporate proxy requires authentication, check the Proxy authentication box and enter your username and password. Click Apply, then click OK, and restart the IDE. This directs IntelliJ's core network traffic through your proxy, ensuring the IDE can update itself and verify its connection to the JetBrains Marketplace.

If connection errors continue, you can add custom parameters to the IDE JVM configuration file. From the main menu, click Help and select Edit Custom VM Options. This command opens your local idea.vmoptions file in the editor. To resolve network port conflicts with local servers that might block the plugin, you can change the Copilot debug port. Add the option -Dcopilot.debug.server.port=YOUR_PORT to the bottom of the file, replacing YOUR_PORT with an available port number. This JVM option forces the background Copilot agent to run on a specific port. You can also configure system environment variables like HTTPS_PROXY or http_proxy to ensure the background Node.js process used by the plugin routes its traffic through the correct proxy address. You must restart the entire IDE application after modifying these files to ensure the JVM loads the new properties.

Resolving SSL Trust Errors in JetBrains Runtime Environment

Another common connection problem in corporate environments is a certificate validation failure, often reported as a self-signed certificate error in the logs. Because IntelliJ IDEA runs on its own bundled Java Runtime Environment, known as the JetBrains Runtime, it does not automatically trust root certificates stored in the operating system's default keychains. To resolve this trust chain issue, you must import your company's custom root CA certificate directly into the JetBrains Runtime cacerts file.

First, locate the keystore file inside your IntelliJ installation folder. For macOS, the path is typically /Applications/IntelliJ IDEA.app/Contents/jbr/Contents/Home/lib/security/cacerts. For Windows or Linux, find the jbr/lib/security/cacerts folder inside the IDE installation directory. Next, open your system terminal and run the keytool utility. Execute the command: keytool -import -alias my-custom-ca -keystore /path/to/your/cacerts -file /path/to/your/certificate.pem. When prompted for the keystore password, enter the default password which is changeit. Once the certificate is imported, restart the IDE to apply the changes. This allows the JRE to trust your company's decryption proxy certificates, resolving handshake failures.

As an alternative to modifying the JRE keystore, you can direct the Copilot agent to use a specific certificate file by setting a system environment variable. Set the variable NODE_EXTRA_CA_CERTS to the absolute path of your certificate PEM file. The background Copilot process will read this environment variable on startup and trust the specified certificate authority, resolving connection errors without modifying the bundled JRE files. You can check the Copilot log file by clicking Help and selecting Show Log in Finder to verify that connection attempts succeed. If you see connection log entries indicating successful handshakes, the plugin is ready to suggest code.

Maintaining Custom IDE Settings in Shared Workspaces

Configuring custom instructions, VM options, and certificates locally helps individual developers get started, but managing these settings across a larger team introduces configuration drift. When new engineers join a project, they must manually configure files like global-copilot-instructions.md and JVM parameters. To prevent setup discrepancies, teams can organize their development configurations inside shared workspaces.

Unlike standard sync services or simple folder storage, Fastio provides shared workspaces designed for engineering teams and their coding agents. Instead of copying configuration files manually, you can store your custom coding guidelines, VM configuration files, and trust certificates in a secure, central workspace. Fastio preserves a per-file version history, so you can track modifications to your setup files and restore prior versions if a configuration error breaks the IDE environment. This ensures that every developer on the team uses the same linting rules and IDE JVM options.

To make these configurations accessible to AI agents, you can enable Intelligence Mode on your workspace. Fastio automatically indexes your configuration documents, making them queryable. Coding agents can access the workspace using Fastio's Model Context Protocol (MCP) server, which supports Streamable HTTP at /mcp and legacy SSE at /sse for direct reads and writes. This allows autonomous agents to inspect your team guidelines, fetch the correct JVM properties, and prepare local IDE settings automatically. You can review the MCP server configurations on our agent storage page to understand tool-surface specifics. In addition, you can use Metadata Views to turn workspace files into a queryable database, allowing teams to view structured parameters without manual data entry. Every organization starts with a 14-day free trial, which requires a credit card. Plans include Starter at $29/mo, Business at $99/mo, and Growth at $299/mo, providing a central, intelligent repository for all your team's code configurations. You can compare features on our pricing page.

Frequently Asked Questions

How do I enable GitHub Copilot in IntelliJ?

To enable GitHub Copilot, you must install the official GitHub Copilot plugin from the JetBrains Marketplace. Navigate to Settings, select Plugins, click the Marketplace tab, and search for 'GitHub Copilot'. Click Install and restart the IDE. After restarting, click the Copilot icon in the status bar or the sidebar, select 'Log in to GitHub', and follow the prompts to activate the plugin with your GitHub account.

Where are GitHub Copilot settings in IntelliJ?

Once the plugin is installed and activated, you can locate the settings by opening the IDE Settings window (Ctrl+Alt+S on Windows or Cmd+, on macOS). In the left-hand sidebar, navigate to Tools and select GitHub Copilot. Here you can configure completion preferences, enable or disable Copilot for specific languages, and manage your account connection.

How to add custom instructions to Copilot in JetBrains?

You can configure custom instructions globally or on a per-project basis. For global configurations, create a markdown file named global-copilot-instructions.md in your system config directory (under .config/github-copilot/intellij/ on macOS or AppData/Local/github-copilot/intellij/ on Windows). For project-level rules, create a copilot-instructions.md file inside a .github folder at the root of your project directory.

Related Resources

Fastio features

Manage your GitHub Copilot instructions in shared workspaces

Set up a shared, intelligent workspace to store custom instructions, certificates, and settings files for your entire development team. Start your 14-day trial to collaborate with shared file context.