Skip to content

Github copilot gives error "authorisation header is badly formatted" when using from docker sbx #3511

Description

@pkimtani

Based on the slack message I posted here
I am hitting an issue with the copilot authentication.

Instead of using the --sandbox from docker-agent, I am approaching this other way around, and running my sbx with docker-agent.

Reason: I couldn't find any documentation about how to pass --template or --kit or both to --sandbox from docker-agent context, but using sbx with docker-agent was quite straightforward and easy to setup + I can reuse it between docker-agent and copilot quite flexibly. 😅

Now, when I try to make any calls to my copilot model, I hit error: "..... Authorization header is badly formatted".

To get it to work, I have to setup GITHUB_COPILOT=gho_xxxxxxx in a my.env file and passed it as runtime using --env-from-file , but it kind of beats the purpose of using sbx because I would like the sbx to not store any secrets, instead be proxy-managed.

I tried to explicity set GITHUB_TOKEN as part of my proxyManagedconfig in the kit, but then I get error: credential for service "github" defined in both docker-agent and my-project-sandbox. And it makes total sense.

This works out of the box with copilot agent in sbx.

Any tips or advice on how I can solve this?

Metadata

Metadata

Assignees

Labels

area/gatewayGateway, proxy, and routingarea/providersFor features/issues/fixes related to LLM providers (Bedrock, LiteLLM, Qwen, custom, etc.)area/securityAuthentication, authorization, secrets, vulnerabilities

Type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions