Skip to main content

GitHub CLI Expiring OAuth Tokens: Prepare Scripts Before Opting In

Updated October 22, 2026. Based on the official announcement linked below.

Shorter-lived credentials can reduce the useful lifetime of a copied access token. They can also expose an old assumption in a script: that a value captured once will keep working indefinitely. GitHub CLI’s new opt-in preview makes this a good moment to inspect how your own workflow obtains credentials.

What GitHub announced

GitHub’s October 21 changelog introduces expiring, automatically refreshing OAuth credentials in public preview. Starting with GitHub CLI 2.103.0, the documented login option is gh auth login --expiring. The CLI stores a rotating refresh token alongside the access token and handles refresh when needed.

GitHub warns that scripts which capture a token and reuse it later can fail when that value expires. It recommends its credential helper for Git over HTTPS and documents support differences across GitHub.com, ghe.com, and Enterprise Server versions. Read the full notice before changing a shared workflow.

Inventory where the credential goes

List the tools and scripts that use your GitHub CLI sign-in. Separate interactive commands from jobs that extract a token and pass it elsewhere. Record the person responsible for each integration.

Do not print credentials into a shared worksheet or paste them into a support conversation while doing this inventory. You need to document the flow, not expose the secret value.

Find assumptions about token lifetime

Look for a setup step that saves one token for later use. Ask whether the receiving tool can obtain a fresh credential through the supported mechanism or expects a permanent value.

A hypothetical daily report might work immediately after setup and then fail because it reuses an old captured credential. The important debugging question is where the token came from and whether refresh is part of the supported path, not simply whether the user can still sign in interactively.

Test a bounded workflow first

Choose a non-production task and use the official instructions for your supported CLI and server versions. Record the previous working configuration so the team can understand what changed.

Check one normal interactive action and one representative automated action. Verify that the automation runs under the intended identity and that its credential handling matches the documented approach. Keep test output free of secret values.

Keep Git and other consumers distinct

A successful CLI command does not prove that every external consumer handles the credential correctly. Review how Git over HTTPS obtains its credential, and follow GitHub’s helper guidance where it applies.

If another tool requires a different authentication method, consult its documentation instead of copying a short-lived token into a field intended for something else. Avoid treating all credential fields as interchangeable.

Document the rollout decision

Write down whether the preview fits the tested workflow, what version was used, and which scripts still require work. A small team should know who will maintain the integration when the preview changes.

Do not describe token expiration as complete protection against credential theft. Refresh credentials and the device holding them still deserve the normal access and security review.

Frequently asked questions

Will existing sign-ins change automatically?

The announcement describes an opt-in preview and says behavior is unchanged if you do not opt in. Verify current documentation before a later rollout.

Why can a script fail while the CLI still works?

Inspect whether the script cached a token outside the supported refresh path. The two consumers may handle credentials differently.

What should a developer do first?

Check versions and map the credential consumers. That preparation makes an opt-in test easier to interpret and avoids surprising another person’s workflow.

Related reading: Respond to exposed API keys · Evaluate local agent access.

Popular posts from this blog

Google Analytics AI Assistant Traffic: A Practical Measurement Guide

Sources checked October 22, 2026. Practical recommendations below are editorial guidance; no hands-on product benchmark is claimed. More discussion of AI search does not automatically tell a publisher what is happening on their own website. A useful measurement routine begins with observed visits, separates them from unobserved visibility, and asks whether visitors find the content valuable. The feature already available to investigate Google Analytics’ release notes date the AI Assistant traffic update to May 13, 2026. Google describes a dedicated channel for recognized assistant referrals, an ai-assistant medium, and an associated campaign value. This is an existing measurement feature relevant to current AI-search discussions, not a new October launch. Check what your own property records before making claims about growth or the amount of traffic an assistant sends. Start with a question you can answer Choose a question such as: “Which articles receive visits classified as AI...

Gemini’s New Small-Business Tools: Build a Reliable Brand Workflow

Updated October 22, 2026. Based on the official announcement linked below. Small businesses rarely lack ideas for marketing. They lack time to turn an idea into accurate copy, consistent visuals, and a finished asset that can be reused. Google’s new Gemini tools are relevant because they bring several parts of that process closer together, but the business still needs a clear source of truth. What Google announced on October 20 Google’s official announcement introduces a Gemini business landing page, connections to Google and third-party tools, brand-style inputs, and financial-data analysis features. It describes retaining visual style from material such as a brand kit, fonts, and palettes. These are Google’s product claims. They do not establish the time savings, accuracy, or financial outcomes your business will achieve. Check which capabilities and connections are available to your account before designing a process around them. Build a one-page brand brief Write down the au...

Meta Muse Sharing Paused: What the Chat-Link Report Means

Source review: October 22, 2026. A link to an AI conversation can feel private when you send it to only one person. The Meta Muse sharing report is a reminder to check what actually controls access before sending work notes, financial details, or personal information. Claroc's GhostShares report says it found more than 6,800 Muse share hostnames through a commercial passive-DNS dataset. Researchers opened a few hundred shared pages without signing in and found sensitive material among them. Their count describes discoverable share addresses, not 6,800 confidential conversations. What was reported about Muse sharing? Claroc says Muse placed conversation titles and random identifiers in share hostnames, making the addresses discoverable through recorded DNS lookups. The researchers reported the issue on October 8 and said they had no evidence of misuse. The Verge reported on October 20 that Meta had paused sharing while reviewing the findings. That is a company response obtain...