{"record":{"id":"15594c68f21d16f5","repo":"gatsbyjs/gatsby","slug":"we-had-trouble-connecting-to-gatsby-cloud-to-creat","errorCode":null,"errorMessage":"We had trouble connecting to Gatsby Cloud to create a login session.\nPlease try again later, and if it continues to have trouble connecting file an issue.","messagePattern":"We had trouble connecting to Gatsby Cloud to create a login session\\.\nPlease try again later, and if it continues to have trouble connecting file an issue\\.","errorType":"panic","errorClass":null,"httpStatus":null,"severity":"error","filePath":"packages/gatsby-cli/src/login.ts","lineNumber":24,"sourceCode":"interface ITicket {\n  verified: boolean\n  token?: string | null\n  expiration?: string | null\n}\n\nconst createTicket = async (): Promise<string> => {\n  let ticketId\n  try {\n    const ticketResponse = await fetch(\n      `https://auth.gatsbyjs.com/auth/tickets/create`,\n      {\n        method: `post`,\n      }\n    )\n    const ticketJson = await ticketResponse.json()\n    ticketId = ticketJson.ticketId\n  } catch (e) {\n    reporter.panic(\n      `We had trouble connecting to Gatsby Cloud to create a login session.\nPlease try again later, and if it continues to have trouble connecting file an issue.`\n    )\n  }\n\n  return ticketId\n}\n\nconst getTicket = async (ticketId: string): Promise<ITicket> => {\n  let ticket: ITicket = {\n    verified: false,\n  }\n  try {\n    const ticketResponse = await fetch(\n      `https://auth.gatsbyjs.com/auth/tickets/${ticketId}`\n    )\n    const ticketJson = await ticketResponse.json()\n    ticket = ticketJson","sourceCodeStart":6,"sourceCodeEnd":42,"githubUrl":"https://github.com/gatsbyjs/gatsby/blob/8b06340921ffdf23125a365b9c9923690cb62ce6/packages/gatsby-cli/src/login.ts#L6-L42","documentation":"Thrown by `createTicket` in the Gatsby Cloud login flow when the `POST https://auth.gatsbyjs.com/auth/tickets/create` request fails (network error, non-2xx response, or JSON parse failure). The login flow needs a ticket id to start the browser-based session, so without it the CLI aborts via `reporter.panic`.","triggerScenarios":"`gatsby login` invokes `createTicket`, which `fetch`-es the auth endpoint. If DNS/routing fails, the request times out, a proxy blocks it, the auth service is down, or the response body is not valid JSON containing `ticketId`, the catch block panics.","commonSituations":"No internet or restricted corporate proxy/firewall blocking `auth.gatsbyjs.com`; auth service outage; misconfigured `HTTPS_PROXY`/`HTTP_PROXY`; running in an environment without outbound network (CI sandbox).","solutions":["Check connectivity to `https://auth.gatsbyjs.com` (curl/browser).","Configure/whitelist the proxy: set `HTTPS_PROXY` and ensure the host is allowed.","Retry later if the auth service is experiencing an outage.","If the issue persists, file the issue referenced in the message."],"exampleFix":null,"handlingStrategy":"retry","validationCode":"async function canReachAuth(): Promise<boolean> {\n  try { const r = await fetch('https://auth.gatsbyjs.com', { method: 'HEAD' }); return r.ok || r.status < 500 } catch { return false }\n}","typeGuard":null,"tryCatchPattern":"let ticketId\nfor (let attempt = 1; attempt <= 3; attempt++) {\n  try { ticketId = await createTicket(); break } catch (e) { if (attempt === 3) throw e; await new Promise(r => setTimeout(r, 1000 * attempt)) }\n}","preventionTips":["Ensure outbound network access to `auth.gatsbyjs.com`.","Configure `HTTPS_PROXY` correctly in restricted networks.","Retry during transient outages before filing an issue."],"tags":["cli","login","network","gatsby-cloud","auth"],"backgroundTag":null,"analyzedSha":"8b06340921ffdf23125a365b9c9923690cb62ce6","analyzedAt":"2026-08-13T02:36:21.405Z","schemaVersion":2},"datasetVersion":"2026-08-13T04:17:16.726Z"}