Skip to main content

Install 'Notation'

Caution

In this guide, we will use the Linux Ubuntu 22 (amd 64). For other operating systems and Linux distributions, please refer to the referenced guides.

Reminder

Please note that on some occasions, commands may require root permissions. Your system and docker user permissions should be configured beforehand to avoid any potential permission issues.


Install Notation on Linux Ubuntu 22

To install Notation on:

Note

This guide refers to Notation version 1.1.0. For the latest versions, refer to the Notary project documentation and adjust the installation procedure accordingly.

Set the download environment variable to the latest Notation version. Example:

export NOTATION_VERSION=1.1.0

Download Notation for the Linux amd64 environment by using the following command:

curl -LO https://github.com/notaryproject/notation/releases/download/v$NOTATION_VERSION/notation_$NOTATION_VERSION\_linux_amd64.tar.gz

or (on Linux):

brew install notation

Optionally download the Notation checksum file:

curl -LO https://github.com/notaryproject/notation/releases/download/v$NOTATION_VERSION/notation_$NOTATION_VERSION\_checksums.txt

Confirm that the shasum command succeeds for the archive file (<ARCHIVE_FILE>) you downloaded.

Navigate to the directory where you have downloaded the archive file. Expand the downloaded archive file directly into /usr/bin/. Replace the variable with your Notation archive file you have downloaded.

Sudo tar xvzf <ARCHIVE_FILE> -C /usr/bin/ notation 

Example command:

tar xvzf notation_1.1.0_linux_amd64.tar.gz OK -C  /usr/bin/ notation 

Alternatively, you can expand the archive file to a different directory and add it to your path. The command below extracts <ARCHIVE_FILE> to an <EXAMPLE_PATH>/notation-cli/ directory and adds the PATH variable to ~/.bashrc.

tar xvzf <ARCHIVE_FILE> -C <EXAMPLE_PATH>/notation-cli/ notation 


echo 'export PATH="$PATH:<EXAMPLE_PATH>/notation-cli/"' >> ~/.bashrc

Example command:

tar xvzf home/securosys/notation_1.1.0_linux_amd64.tar.gz -C home/securosys/notation-cli/ notation 

echo 'export PATH="$PATH: home/securosys/notation-cli/"' >> ~/.bashrc

Notation Directory Structure

Directory variableDescription
{NOTATION_BIN}The path for the notation binary. There is no default NOTATION_BIN path at user level since the notation binary can be put anywhere as long as it in the PATH environment variable.
{NOTATION_CONFIG}Directory for configurations, e.g. config.json, signingkeys.json, trustpolicy.json, truststore
Linux: "${HOME}/.config/notation/"
macOS: "${HOME}/Library/Application\ Support/notation/"
Windows: "%USERPROFILE%/AppData/Roaming/notation/".
{NOTATION_LIBEXEC}Directory for binaries not meant to be executed directly by users' shell or scripts. The plugin binary and its config.json is installed under the {NOTATION_LIBEXEC} directory following the pattern: {NOTATION_LIBEXEC}/plugins/securosys/notation-securosys
Linux: "${HOME}/.config/notation/"
macOS: "${HOME}/Library/Application\ Support/notation/"
Windows: "%USERPROFILE%/AppData/Roaming/notation/"