powerloader icon indicating copy to clipboard operation
powerloader copied to clipboard

For ghcr.io we can fetch a default user

Open wolfv opened this issue 3 years ago • 1 comments

Using something like:

curl \
  -H "Accept: application/vnd.github.v3+json" \
  -H "Authorization: token $GHA_PAT" \
  https://api.github.com/user

wolfv avatar Jan 10 '22 11:01 wolfv

That works:

❯ gh api /user | jq .login
"dhirschfeld"

..and is a good default if the GHA_USER env var isn't set, but it won't work for organisation owned packages (which is fine, since it's just a default in case of missing config)

dhirschfeld avatar Feb 20 '23 12:02 dhirschfeld