Skip to content
This repository has been archived by the owner on Dec 5, 2024. It is now read-only.

For ghcr.io we can fetch a default user #60

Open
wolfv opened this issue Jan 10, 2022 · 1 comment
Open

For ghcr.io we can fetch a default user #60

wolfv opened this issue Jan 10, 2022 · 1 comment

Comments

@wolfv
Copy link
Member

wolfv commented Jan 10, 2022

Using something like:

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

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)

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants