Skip to main content

Checksum is required

It may fail to install a tool by the error checksum is required.

e.g.

$ terracognita --help
INFO[0000] download and unarchive the package aqua_version= env=darwin/arm64 exe_path=/Users/shunsukesuzuki/.local/share/aquaproj-aqua/pkgs/github_release/github.com/cycloidio/terracognita/v0.8.1/terracognita-darwin-amd64.tar.gz/terracognita-darwin-amd64 package=cycloidio/terracognita package_name=cycloidio/terracognita package_version=v0.8.1 program=aqua registry=standard require_checksum=true
FATA[0000] aqua failed aqua_version= env=darwin/arm64 error="checksum is required" program=aqua

What does this error mean?

This error means the checksum verification failed because the expected checksum can't be got from aqua-checksums.json and the package's checksum configuration.

How to solve the error

There are several ways to solve the error.

  1. Add the checksum configuration to the registry configuration
  2. Add the checksum to the file aqua-checksums.json
  3. Disable require_checksum in aqua.yaml
  4. Disable the checksum verification in aqua.yaml

Add the checksum configuration to the registry configuration

If the checksum file is provided at GitHub Releases or any URL, you can add the checksum configuration to the registry configuration.

On the other hand, some packages doen't provide checksum files.

In that case, you can't add the checksum configuration.

Add the checksum to the file aqua-checksums.json

You can calculate the checksum and add it to aqua-checksums.json.

e.g.

{
"checksums": [
{
"id": "github_release/github.com/golangci/golangci-lint/v1.49.0/golangci-lint-1.49.0-darwin-amd64.tar.gz",
"checksum": "20cd1215e0420db8cfa94a6cd3c9d325f7b39c07f2415a02d111568d8bc9e271",
"algorithm": "sha256"
}
]
}

Disable require_checksum in aqua.yaml

You can disable require_checksum in aqua.yaml.

aqua.yaml

AS IS

checksum:
enabled: true
require_checksum: true

TO BE

checksum:
enabled: true
# By default, `require_checksum` is false
require_checksum: false

Disable the checksum verification in aqua.yaml

You can disable the checksum verification.

aqua.yaml

AS IS

checksum:
enabled: true
require_checksum: true

TO BE

checksum:
# By default, `enabled` is false
enabled: false
require_checksum: false