{"record":{"id":"d4f95ead8b480408","repo":"microsoft/vscode","slug":"authorization-failed-please-sign-into-github-and-d4f95e","errorCode":null,"errorMessage":"Authorization failed. Please sign into GitHub and try again.","messagePattern":"Authorization failed\\. Please sign into GitHub and try again\\.","errorType":"exception","errorClass":"Error","httpStatus":null,"severity":"error","filePath":"extensions/copilot/src/extension/chatSessions/vscode-node/copilotCloudSessionsProvider.ts","lineNumber":1609,"sourceCode":"\t\t\t\t}\n\t\t\t*/\n\t\t\tthis.telemetry.sendMSFTTelemetryEvent('copilotcloud.chat.confirmationCancelled', {\n\t\t\t\ttokenCancelled: String(token.isCancellationRequested)\n\t\t\t});\n\t\t\tstream.markdown(vscode.l10n.t('Cloud agent cancelled'));\n\t\t\treturn {};\n\t\t}\n\n\t\tif (selection.includes(this.AUTHORIZE.toUpperCase())) {\n\t\t\tstream.progress(vscode.l10n.t('Authorizing'));\n\t\t\ttry {\n\t\t\t\tawait this._authenticationService.getGitHubSession('permissive', { createIfNone: { detail: l10n.t('Sign in to GitHub with additional permissions to use Copilot cloud sessions.') } });\n\t\t\t\tif (!this._authenticationService.permissiveGitHubSession) {\n\t\t\t\t\tthrow new Error('Failed to obtain permissive GitHub session');\n\t\t\t\t}\n\t\t\t} catch (error) {\n\t\t\t\tthis.logService.error(`Authorization failed: ${error}`);\n\t\t\t\tthrow new Error(vscode.l10n.t('Authorization failed. Please sign into GitHub and try again.'));\n\n\t\t\t}\n\t\t}\n\n\t\tlet head_ref: string | undefined; // If set, this is the branch we pushed pending changes to.\n\n\t\tif (selection.includes(this.COMMIT.toUpperCase())) {\n\t\t\ttry {\n\t\t\t\tstream.progress(vscode.l10n.t('Committing and pushing local changes'));\n\t\t\t\thead_ref = await this.gitOperationsManager.commitAndPushChanges();\n\t\t\t\tstream.markdown(vscode.l10n.t('Local changes pushed to remote branch `{0}`.', head_ref));\n\t\t\t} catch (error) {\n\t\t\t\tthis.logService.error(`Commit and push failed: ${error}`);\n\t\t\t\tthrow vscode.l10n.t('{0}. Commit or stash your changes and try again.', (error instanceof Error ? error.message : String(error)) ?? vscode.l10n.t('Failed to commit and push changes.'));\n\t\t\t}\n\t\t} else if (selection.includes(this.PUSH_BRANCH.toUpperCase())) {\n\t\t\ttry {\n\t\t\t\tstream.progress(vscode.l10n.t('Pushing base branch to remote'));","sourceCodeStart":1591,"sourceCodeEnd":1627,"githubUrl":"https://github.com/microsoft/vscode/blob/a94b963a32aa9749d69504576791fa29700ae46d/extensions/copilot/src/extension/chatSessions/vscode-node/copilotCloudSessionsProvider.ts#L1591-L1627","documentation":"Error \"Authorization failed. Please sign into GitHub and try again.\" thrown in microsoft/vscode.","triggerScenarios":"Thrown at extensions/copilot/src/extension/chatSessions/vscode-node/copilotCloudSessionsProvider.ts:1609 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":[],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"analyzedSha":"a94b963a32aa9749d69504576791fa29700ae46d","analyzedAt":"2026-08-12T01:08:56.794Z","schemaVersion":2},"datasetVersion":"2026-08-12T06:17:24.410Z"}