79168614

Date: 2024-11-08 02:38:59
Score: 1
Natty:
Report link

It turns out that ghcr.io uses basic authentication in the form of <username>:<PAT>

So it would look something like this.

curl -H "Authorization: Basic $BASE64_CREDENTIALS" "https://ghcr.io/token?service=ghcr.io&scope=repository:<user>/<image>:pull"

{"token":"xyz"}
Reasons:
  • Low length (0.5):
  • Has code block (-0.5):
  • Self-answer (0.5):
  • Low reputation (0.5):
Posted by: StaticMethod