to place a new remote at a specific priority level. Remotes are checked in the order they are listed. Set as the first priority (index 0): conan remote add my-repo --insert Use code with caution. Copied to clipboard Force Update
A is a network repository used by the Conan package manager to store, share, and retrieve C and C++ package binaries and recipes . By default, Conan configures the official repository ( ConanCenter ), but teams must frequently add custom remotes to host private packages or mirror public dependencies. 1. Prerequisites for Adding a Remote
Remote priority matters: Conan searches remotes in the order they are listed (from highest to lowest priority). To make your company remote take precedence over Conan Center:
conan remote list
In Conan, a remote repository is a centralized location that stores packages and their metadata. Remote repositories can be used to share packages across different teams, projects, and environments, making it easier to manage dependencies and collaborate on projects. By default, Conan comes with a remote repository called conanfile.py which is used to store packages. conan add remote
To see your existing list of remotes and their evaluation order, execute: conan remote list Use code with caution. The output will look similar to this:
While the command itself is simple, the workflow surrounding it introduces complexity:
The conan add remote command is the primary mechanism used to register a remote server (a repository of binary packages and source code recipes) with a local Conan client. By executing this command, developers instruct their local Conan installation to query external servers—such as the official Conan Center, private company Artifactory instances, or custom servers—when searching for or downloading dependencies.
Adding the remote defines the location, but if the repository is private, you cannot download or upload packages until you log in. to place a new remote at a specific priority level
conan remote add local-test http://localhost:9300 --insecure Use code with caution. conan remote add local-test http://localhost:9300 False Use code with caution. Authentication: Authenticating with Your New Remote
Adding a remote is the first step. For private repositories that require access control, you must authenticate to perform operations like uploading or downloading packages. Conan uses JSON Web Tokens (JWT) for secure, session-based authentication.
conan user -p my_password_or_token -r my-company-repo my_username Use code with caution.
After adding, use these companion commands: Copied to clipboard Force Update A is a
: A unique identifier of your choice (e.g., my-company-artifactory ).
# Your custom remote (highest priority) conan remote add custom-vendor https://vendor.artifactory.com --insert 0
If you're interested, I can also show you how to set up JFrog Artifactory specifically for Conan.