Is it possible to get the SHA-256 of an uploaded file? #210829
Replies: 2 comments
|
Thank you for your interest in contributing to our community! We currently only accept discussions created through the GitHub UI using our provided discussion templates. Please re-submit your discussion by navigating to the appropriate category and using the template provided. This discussion has been closed because it was not submitted through the expected format. If you believe this was a mistake, please reach out to the maintainers. |
|
Depends on where the file was uploaded. Release asset (a file attached to a release): GitHub already computes it. On the release page each asset shows a curl -s https://api.github.com/repos/OWNER/REPO/releases/latest \
| jq '.assets[] | {name, digest}'I checked this against File committed to a repo: GitHub doesn't show a SHA-256 for these. The curl -sL https://raw.githubusercontent.com/OWNER/REPO/BRANCH/PATH | sha256sum
# macOS: shasum -a 256
# Windows PowerShell: Get-FileHash .\file -Algorithm SHA256 |
Uh oh!
There was an error while loading. Please reload this page.
Hello,
After I file has been uploaded to GitHub, is it possible to get the SHA-256 hash? If yes, how?
Thanx
All reactions