This topic describes how to configure hex.pm
self-hosted to resolve packages using Hex remote repositories in Artifactory. It provides instructions to configure the mix client to resolve packages via Hex remote repositories from the self-hosted servers.
Connect your Mix client to a private organization within hex.pm
Prerequisite
Download Public Key to Hex Project Folder
To configure your Mix client for a private self-hosted Hex registry that points to hex.pm, run the following command from your project folder:
Refer to View Set Me Up Instructions - Hex Repository topic to view Configure code snippets.
Note
Make sure to replace the placeholders in bold with your token, JFrog domain name, port, and JFrog repository key. These placeholders are auto-populated if you copy the Set Up A Hex Client Configure code snippets from the UI.
mix hex.repo add <REPOSITORY_KEY> http://<HOST>:<PORT>/artifactory/api/hex/<REPOSITORY_KEY> --auth-key "Bearer <TOKEN>" --public-key ./publickey.pem
For example:
mix hex.repo add hex-test https://john.jfrog.io/artifactory/api/hex/hex-remote --auth-key "Bearer cmVmdGtuOjAxOj45NTgzNzg3NDA6RnkKLXlYaFVCYXZYOONaY2dRUEJioEVpNFpT" --public-key ./publickey.pem
Note
Make sure that the publickey.pem
key is pointing to the correct location in your project.