Not possible to authenticate when running in Docker development container
I assume Copilot auth should try to open a browser, but I do not have access to one as I am running nvim in a devcontainer?
Any workaround? Nothing happens when calling Copilot auth.
Thank you.
What happens when you command :Copilot auth signin?
If you have access to an instance running outside of docker, you might also try the token auth flow detailed here and just put the token in your container's environment:
Tokens given by
gh auth tokendo not support Copilot, you therefore need to first generate a token through the LSP by:
- Authenticating using the
Permanent sign-inmethod- Grab the token by running
:Copilot auth info- You can then safely delete the
github-copilotfolder created in your NeoVim base data directory.Set either the environment variable
GITHUB_COPILOT_TOKENorGH_COPILOT_TOKENto that token. Note that if you have the variable set, even empty, the LSP will attempt to use it to log in.