404: the URL is wrong or the file does not exist
CommonA version or path variable that is empty or wrong, a release asset that was renamed, or a download from a branch or tag that does not exist.
Confirm
echo "$URL" curl -sS --fail-with-body "$URL" | head -c 300
A malformed URL, or the server's explanation in the body
Fix
- Correct the URL; print it in the script while debugging, and fail early when a variable that builds it is empty.