Fixing the GitHub Copilot CLI error "You are not authorized to use this Copilot feature"
Posted: (EET/GMT+2)
If you are starting to use GitHub Copilot's command-line (CLI) version, you might run into the following error message:
You are not authorized to use this Copilot feature, it requires an enterprise or organization policy to be enabled.
If this happens, log into your organization's GitHub account, and under the menu on the left-hand side, navigate to the following:
Code, planning, and automation > Copilot > Policies.
Then, on the right, scroll down until you see the option "Copilot CLI". If you received the above error, then most likely, the setting is set to "Unconfigured".
Change this setting to "Enabled", and the problem goes away. Note that it can take a few moments (half an hour?) to propagate through to your CLI. Make sure you restart the CLI application, and then you should be set.
Happy co-piloting!