Connect Conan V1 to Artifactory

JFrog Artifactory Documentation

Products
JFrog Artifactory
Content Type
User Guide

Artifactory supports using Conan V1 as a legacy tool to update and install packages from Artifactory.

conan remote vs Remote Repositories

The conan remote command connects the Conan client to remote repositories. When configuring the Conan client to work with Artifactory, you use the conan remote command to connect to a local or virtual Artifactory repository.

In Artifactory, a remote repository is a caching proxy for a repository at a remote URL.

Prerequisite: Before connecting your Conan client to Artifactory, you must have an existing Conan repository in Artifactory. For more information, see Create a Conan Repository.

To connect Conan V1 to Artifactory:

  1. Run the following command to add the Artifactory repository to your Conan configuration:

    conan remote add <REMOTE_NAME> https://[JFrogPlatformURL]/artifactory/api/conan/<REPO_NAME>

    Where:

    • <REMOTE_NAME>: The local alias you want to set for the Artifactory repository

    • [JFrogPlatformURL]: The URL of your JPD

    • <REPO_NAME>: The name of the target repository in Artifactory

    For example:

    conan remote add artifactory https://company.jfrog.io/artifactory/api/conan/conan-virtual

    Tip

    Important: Note that if you run this command copied directly from Set Me Up, the remote name will match the repository name. If you want a different remote name, change the value before running the command.

  2. Run the following command:

    export CONAN_REVISIONS_ENABLED=1
  3. Log in by running this command:

    conan user -p <TOKEN> -r <REMOTE_NAME> <USERNAME>

    Where:

    • <TOKEN>: Your Artifactory identity token

    • <REMOTE_NAME>: The local alias of the Artifactory repository

    • <USERNAME>: The username you use to access Artifactory

    For example:

    conan user -p gH5fLdFhJkLpA2sD4fG6hJ8kM1nB3cV5xZ7aW9qE2sR4t -r artifactory jeffryfrog

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: