You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
gh-image currently only handles the upload half of the attachment problem. The download half has no solution anywhere in the ecosystem: there is no way to fetch a user-attachments file from a private repo programmatically.
Since gh-image already solves the browser-session problem for uploads, it is well positioned to do the same for downloads — e.g.:
gh image download <user-attachments-url> [-o path]
gh image download --issue 42 --repo owner/repo # pull every attachment off an issue
The session resolution order would be identical to upload (--token → GH_SESSION_TOKEN → browser cookie), so no new credential surface is introduced.
Why this is worth doing
This is a genuine, well-documented ecosystem gap. user-attachments links on private and internal repos require a browser session — fine-grained PATs, classic PATs, OAuth apps, and GitHub App tokens all return 404:
cli/cli#9046 — "Download attachment/file from an issue/pr" (open)
github/gh-aw#21242 — "Enable agentic workflows to access issue/PR file attachments" (open; GitHub's own agentic-workflows project hitting the same wall)
community#162417 — "Unable to download attached file to a GitHub Issue" (answered: "These links need a browser session, so API requests won't work"; the suggested workarounds are headless Puppeteer or "don't use attachments")
community#54551 — "More secure private attachments - GA", the change that made this session-only in the first place
Open questions
Should this be gh image download, or a separate verb? Downloading isn't really "image" anymore.
Bulk mode: worth resolving attachments straight off an issue/PR body, or keep it URL-in / file-out?
Idea
gh-imagecurrently only handles the upload half of the attachment problem. The download half has no solution anywhere in the ecosystem: there is no way to fetch auser-attachmentsfile from a private repo programmatically.Since
gh-imagealready solves the browser-session problem for uploads, it is well positioned to do the same for downloads — e.g.:The session resolution order would be identical to upload (
--token→GH_SESSION_TOKEN→ browser cookie), so no new credential surface is introduced.Why this is worth doing
This is a genuine, well-documented ecosystem gap.
user-attachmentslinks on private and internal repos require a browser session — fine-grained PATs, classic PATs, OAuth apps, and GitHub App tokens all return 404:Open questions
gh image download, or a separate verb? Downloading isn't really "image" anymore.SKILL.mdneeds to cover downloaded content too, not just uploads.Not scheduled — filing so the idea isn't lost.