In order for your opkg client to work with Artifactory, you need to add Artifactory Opkg feeds and credentials to your opkg.conf file.
To configure the opkg client to work with Artifactory:
Run the following command to add an Artifactory feed to your client:
echo 'src <FEED_NAME> /artifactory/<REPO_NAME>/<PATH_TO_FEED>' >> /etc/opkg/opkg.conf
Tip
To install the
.gzvariant of the Package index file, replacesrcwithsrc/gz.Where:
<FEED_NAME>: The name of the feed: The base URL of your JPD<REPO_NAME>: The name of the target repository in Artifactory<PATH_TO_FEED>: The path to the index file in the target repository
For example:
# Default connection using hostname and port src artifactory-feed http://prod.mycompany:8080/artifactory/opkg-virtual/my-distro/1.0/i386 >> /etc/opkg/opkg.conf # Secure connection using a standard HTTPS URL src/gz artifactory-feed /artifactory/opkg-virtual/my-distro/1.0/armv7a >> /etc/opkg/opkg.conf
To access Artifactory feeds that require authentication, run this command to add credentials to your client:
echo 'option http_auth <USERNAME>:<AUTH_TOKEN>' >> /etc/opkg/opkg.conf
Where:
<USERNAME>: Your Artifactory username<AUTH_TOKEN>: Your Artifactory identity token
For example:
echo 'option https_auth jeffry:akcp_aL9k4jPq7bE2C8QmZcV8nF3mG5hJ1yX9mI8oPzAsDtFgHjKlM' >> /etc/opkg/opkg.conf
Tip
You can also use an encrypted plaintext password as described in Centrally Secure Passwords.
Note
You can also use JFrog Set me up to copy the snippet populated with your token and environment. For more information, see Use Artifactory Set Me Up for Configuring Package Manager Clients.
Next steps: