Created
September 8, 2021 13:08
-
-
Save wolfv/fc04f85b2bd0141326f6ecff03d9b101 to your computer and use it in GitHub Desktop.
Fetch from OCI registry (ghcr.io)
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
export TOKEN=$(curl --silent https://ghcr.io/token\?scope\=repository:wolfv/artifact:pull | jq -r .token) | |
curl \ | |
--silent \ | |
--request 'GET' \ | |
--header "Authorization: Bearer $TOKEN" \ | |
--header "Accept: application/vnd.oci.image.manifest.v1+json" \ | |
'https://ghcr.io/v2/wolfv/artifact/manifests/1.0' | |
echo "\n\nFetching image content now:\n\n" | |
curl \ | |
--location \ | |
--request GET \ | |
--header "Authorization: Bearer ${TOKEN}" \ | |
"https://ghcr.io/v2/wolfv/artifact/blobs/sha256:c5be3ea75353851e1fcf3a298af3b6cfd2af3d7ff018ce52657b6dbd8f986aa4" | |
Doesn't work :(
user@disp897:~$ curl \
--location \
--request GET \
--header "Authorization: Bearer ${TOKEN}" \
"https://ghcr.io/v2/wolfv/artifact/blobs/sha256:c5be3ea75353851e1fcf3a298af3b6cfd2af3d7ff018ce52657b6dbd8f986aa4"
{"errors":[{"code":"BLOB_UNKNOWN","message":"blob unknown to registry"}]}
user@disp897:~$
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
to save to file add