Coding
PromptBeginner5 minmarkdown
Markdown Converter
Agent skill for markdown-converter
21
Sign in to like and favorite skills
Direct fetch with auth header usually works:
curl -L -H "Authorization: token $(gh auth token)" "URL"
Images uploaded to issues (drag-drop attachments) are served from
user-images.githubusercontent.com or private-user-images.githubusercontent.com with signed/tokenized URLs. The raw markdown URL often returns 404 even with valid auth.
Reliable approach: Fetch the issue body as HTML, extract the signed
<img src> URLs:
# Get issue body as rendered HTML gh api repos/{owner}/{repo}/issues/{number} \ -H "Accept: application/vnd.github.html+json" \ | jq -r '.body_html' \ | grep -oP 'src="\K[^"]+' # Download the signed URL (no auth header needed - URL is self-authenticating) curl -L -o image.png "SIGNED_URL"
permissions: issues: read contents: read # if also checking out code
The
gh CLI is already authenticated in GitHub Actions via GITHUB_TOKEN.