This topic describes how to configure hex.pm
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 public-hosted servers.
Connect your Mix client to the public registry or a private organization within hex.pm
Prerequisite
Download Public Key to Hex Project Folder
To set up your Mix client using a Hex remote repository pointing to hex.pm, use 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 set hexpm --url http://<YOUR_JFROG_DOMAIN>:<PORT>/artifactory/api/hex/<REPOSITORY_NAME> --auth-key "Bearer <TOKEN>" --public-key ./publickey.pem
For example:
mix hex.repo set hexpm --url 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.