Skip to main content

Create an Alpine Repository

To install or host Alpine packages, creation of an Alpine repository is required. Check out Nexus Repository Management and Repository Types to learn more.

Alpine Proxy Repository

Use Nexus proxy repository when you want to download packages and centralize package caching of external dependencies. To learn more, check Proxy Repositories.

To create a new Alpine proxy repository, take the following steps:

Nexus One UI

  1. Navigate to Settings → Repositories.

  2. Select Create Repository.

  3. From the Select Format section, select Alpine.

  4. From the Select Type section, select Proxy.

  5. In the form that appears, complete the required fields.

  6. Configure Alpine signing settings as required by your repository setup. For more details, see Generate an Alpine Signing Key.

  7. Complete the additional fields for configurations you wish to add for creating your repository. Available configurations differ by repository format and type. See Configurable Repository Fields for more details. Click Continue.

  8. In the Enable RHC section, turn on Enable Repository Health Check to analyze components for security vulnerabilities and license issues. Leave it disabled to configure it later.

  9. Select Create Repository.

Classic UI

  1. Navigate to Settings → Repository → Repositories.

  2. Select Create repository.

  3. From the list of Recipes, select alpine (proxy).

  4. In the form that appears, complete the required fields.

  5. Configure Alpine signing settings as required by your repository setup. For more details, see Generate an Alpine Signing Key.

  6. Complete the additional fields for configurations you wish to add for creating your repository. Available configurations differ by repository format and type. See Configurable Repository Fields for more details.

  7. Select Create repository.

    alpine_proxy.png

Alpine Hosted Repository

Use Nexus hosted repository when you want to publish and store your own internal artifacts and third party components, so they can be consumed via Nexus. To learn more, check Hosted Repositories.

To create a new Alpine hosted repository, take the following steps:

Nexus One UI

  1. Navigate to Settings → Repositories.

  2. Select Create Repository.

  3. From the Select Format section, select Alpine.

  4. From the Select Type section, select Hosted.

  5. In the form that appears, complete the required fields.

    • Name, for example alpine-hosted

    • Blob Store

  6. Configure Alpine signing settings as required by your repository setup. For more details, see Generate an Alpine Signing Key.

  7. Complete the additional fields for configurations you wish to add for creating your repository. Available configurations differ by repository format and type. See Configurable Repository Fields for more details.

  8. Select Create Repository.

    alpine-hosted-new_ui.png

Classic UI

  1. Navigate to Settings → Repository → Repositories.

  2. Select Create repository.

  3. From the list of Recipes, select alpine (hosted).

  4. In the form that appears, complete the required fields.

    • Repository Name, for example alpine-hosted

    • Blob store

  5. Configure Alpine signing settings as required by your repository setup. For more details, see Generate an Alpine Signing Key.

  6. Complete the additional fields for configurations you wish to add for creating your repository. Available configurations differ by repository format and type. See Configurable Repository Fields for more details.

  7. Select Create repository.

    alpine_hosted.png

Alpine Group Repository

Use Nexus group repository when you want to combine multiple other repositories (proxy, hosted, and other groups) and expose them through a single URL. To learn more, check Group Repositories.

To create a new Alpine group repository, take the following steps:

Nexus One UI

  1. Navigate to Settings → Repositories.

  2. Select Create Repository.

  3. From the Select Format section, select Alpine.

  4. From the Select Type section, select Group.

  5. In the form that appears, complete the required fields.

    • Name, for example alpine-group

    • Blob Store

    • Member Repositories in the desired order

  6. Configure Alpine signing settings as required by your repository setup. For more details, see Generate an Alpine Signing Key.

  7. Complete the additional fields for configurations you wish to add for creating your repository. Available configurations differ by repository format and type. See Configurable Repository Fields for more details.

  8. Select Create Repository.

    alpine-group-new_ui.png

Classic UI

  1. Navigate to Settings → Repository → Repositories.

  2. Select Create repository.

  3. From the list of Recipes, select alpine (group).

  4. In the form that appears, complete the required fields.

    • Repository Name, for example alpine-group

    • Blob store

    • Member repositories in the desired order

  5. Configure Alpine signing settings as required by your repository setup. For more details, see Generate an Alpine Signing Key.

  6. Complete the additional fields for configurations you wish to add for creating your repository. Available configurations differ by repository format and type. See Configurable Repository Fields for more details.

  7. Select Create repository.

    alpine_group.png

Generate an Alpine Signing Key

Use an RSA private key in PKCS#8 PEM format to sign Alpine repository metadata. Take the following steps to generate and rename the signing key:

  1. Generate the 2048-bit RSA key using the following command to save it directly to a file.

    openssl genrsa 2048 | openssl pkcs8 -topk8 -nocrypt -out alpine-signing.key
  2. Extract the public key from the private key.

    openssl rsa -in alpine-signing.key -pubout -out alpine-signing.pub
  3. Generate the public key filename. Alpine requires the public key to have a specific filename derived from your private key. The filename follows the pattern key-<hash>.rsa.pub.

    Run the following code to generate the filename:

    For Windows:

    $l = Get-Content alpine-signing.key
    $b = ($l[1..($l.Count-2)] -join '') -replace '\s',''
    $h = -join ([Security.Cryptography.SHA256]::Create().ComputeHash([Text.Encoding]::ASCII.GetBytes($b)) | ForEach-Object { $_.ToString('x2') })
    "key-$($h.Substring(56,8))"

    For Linux or macOS:

    sed '1d;$d' alpine-signing.key | tr -d '\n\r ' | sha256sum | awk '{print "key-" substr($1, 57, 8)}'

    For macOS (using shasum):

    sed '1d;$d' alpine-signing.key | tr -d '\n\r ' | shasum -a 256 | awk '{print "key-" substr($1, 57, 8)}'
  4. Rename your public key using the generated filename.