Set up GitHub Copilot Chat
Configure GitHub Copilot Chat in your OpenShift Dev Spaces workspace to receive AI-powered code suggestions, completions, and inline explanations directly in the editor.
Before you begin
- You have a GitHub account with an active GitHub Copilot subscription.
- You have a running OpenShift Dev Spaces workspace with the Code - OSS editor.
- You have access to the following URLs from the workspace (ensure they are added to the allowlist if you are in a restricted or air-gapped environment):
Procedure
Results
- Open the Copilot Chat panel, type a prompt such as "Explain this file", and verify that a response appears.
Device Authentication is a one-time step. The credentials are saved as a OpenShift object and persist across workspaces on the same cluster.
If you attempted to use Copilot Chat before completing Device Authentication, the extension may enter an error state. Typical symptoms include:
- Copilot Chat appears to be connected but does not respond to prompts.
- The Copilot Chat output log contains errors such as:
Failed to get copilot token. reason: NotAuthorized GitHub Copilot could not connect to server. Extension activation failed: "Failed to get copilot token. reason: NotAuthorized"
This happens when Sign in to use AI Features is triggered before a valid Device Authentication token exists.
To recover:
- Click the Accounts icon on the left activity bar, select your account, and click Sign Out. A confirmation dialog appears indicating the account has been used by the Dev Spaces Copilot Chat Integration. Click Sign Out to confirm.
- Press F1 to open the Command Palette and run
GitHub: Device Authentication. Complete the device authentication flow in the browser. - Refresh the browser page when prompted. Copilot Chat is now ready to use.