Skip to content

Enterprise accounts #1260

@IeuanWalker

Description

@IeuanWalker

Does the SDK work with github enterprise accounts?

Im building an app that uses the github signed in user auth flow - https://docs.github.com/en/enterprise-cloud@latest/copilot/how-tos/copilot-sdk/authenticate-copilot-sdk/authenticate-copilot-sdk#github-signed-in-user

Works fine when using a standard user account, once i logout and then login to the cli using an enterprise account the SDK comes back as authenticated = false and of course api call fails -

System.IO.IOException: Communication error with Copilot CLI: Request models.list failed with message: Not authenticated. Please authenticate first.
 ---> GitHub.Copilot.SDK.RemoteRpcException: Request models.list failed with message: Not authenticated. Please authenticate first.
   at GitHub.Copilot.SDK.JsonRpc.InvokeAsync[T](String method, Object[] args, CancellationToken cancellationToken)
   at GitHub.Copilot.SDK.JsonRpc.InvokeAsync[T](String method, Object[] args, CancellationToken cancellationToken)
   at GitHub.Copilot.SDK.CopilotClient.InvokeRpcAsync[T](JsonRpc rpc, String method, Object[] args, StringBuilder stderrBuffer, CancellationToken cancellationToken)
   --- End of inner exception stack trace ---
   at GitHub.Copilot.SDK.CopilotClient.InvokeRpcAsync[T](JsonRpc rpc, String method, Object[] args, StringBuilder stderrBuffer, CancellationToken cancellationToken)
   at GitHub.Copilot.SDK.CopilotClient.InvokeRpcAsync[T](JsonRpc rpc, String method, Object[] args, CancellationToken cancellationToken)
   at GitHub.Copilot.SDK.CopilotClient.ListModelsAsync(CancellationToken cancellationToken)
   at Cockpit.Features.Models.ModelFeature.GetModels() in C:\Users\c773975\source\repos\GHMine\Cockpit\src\Cockpit\Features\Models\ModelFeature.cs:line 37
   at Cockpit.Features.Models.ModelFeature.GetModels() in C:\Users\c773975\source\repos\GHMine\Cockpit\src\Cockpit\Features\Models\ModelFeature.cs:line 37
   at Cockpit.Features.Models.ModelFeature.GetDefaultModel() in C:\Users\c773975\source\repos\GHMine\Cockpit\src\Cockpit\Features\Models\ModelFeature.cs:line 55
   at Cockpit.Features.Sessions.SessionFeature.CreateSession(String workingDirectory) in C:\Users\c773975\source\repos\GHMine\Cockpit\src\Cockpit\Features\Sessions\SessionFeature.Lifecycle.cs:line 100
Exception thrown: 'System.IO.IOException' in Cockpit.dll
Exception thrown: 'System.IO.IOException' in System.Private.CoreLib.dll
Cockpit.Components.Popups.CreateSessionPopup: Error: Error creating session for directory C:\Users\c773975\source\repos\Work\WasteManagement-Bulky

Metadata

Metadata

Assignees

No one assigned

    Labels

    questionFurther information is requested

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions