Configure opkg to Work with Artifactory

JFrog Artifactory Documentation

Products
JFrog Artifactory
Content Type
User Guide

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:

  1. 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 .gz variant of the Package index file, replace src with src/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
  2. 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.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: