Created
April 23, 2024 02:03
-
-
Save renfei/57eaea351657c0a476a7997a2f761d4c to your computer and use it in GitHub Desktop.
Fetch from OCI registry (ghcr.io)
This file contains hidden or 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
| #!/bin/sh | |
| # Get Token | |
| curl -u renfei:{password} https://ghcr.io/token\?scope\=repository:renfei/renfeid:pull | |
| # Get manifests | |
| curl "https://ghcr.io/v2/renfei/renfeid/manifests/latest" -H "Authorization: Bearer {TOKEN}" | |
| # Get blobs | |
| curl https://ghcr.io/v2/renfei/renfeid/blobs/sha256:0f3320e4e2ae41973a279c466eba6f7af49750691a7d55baabde5b47c635660f -H "Authorization: Bearer {TOKEN}" -v | |
| # 307 redirect to | |
| https://pkg-containers.githubusercontent.com/ghcr1/blobs/sha256:643e7d1b70050a8ce798dd3e13997617b1e1bfa20ea27e091160fa08b3f867d3?se=2024-04-23T02%3A00%3A00Z&sig=2ti4Gs7Ybo%2B47XCnVuwoKvlLGLV1U%2B1i1ZWilf3Uank%3D&sp=r&spr=https&sr=b&sv=2019-12-12 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment