If you have private packages that share names with public packages, ensure your private remote is checked first. You can reorder remotes simply by removing and re-adding them in the desired order, or by editing the remotes.yaml file located in your Conan home directory ( ~/.conan2/remotes.yaml for Conan 2.x).
# Add a remote and make it the first to be checked conan remote add fast-repo https://repo.com --insert 0 Use code with caution. 2. Forcing an Update ( --force )
A remote in Conan is a URL pointing to a server that stores pre-compiled binaries and package recipes. When you run conan install , the client searches these remotes in a specific priority order to find the requested library. Managing these connections allows you to: Fetch public open-source libraries from ConanCenter. conan add remote
: Pass authentication details using environment variables instead of hardcoding passwords:
However, in an enterprise environment, you will almost always need to add private remotes. These private servers host your internal libraries, proprietary code, or cached copies of public packages. The Core Command: conan remote add If you have private packages that share names
$ conan remote add team_a_remote https://team-a-server.com/conan -ap myproject/* -ap sharedlib/*@team/*
Check the URL. Ensure the URL is the correct API endpoint, not just the base Artifactory URL. Managing these connections allows you to: Fetch public
The remote was added successfully, but your current session lacks permissions.
If you are working with a private repository using a self-signed certificate, you may need to disable SSL verification (not recommended for production): conan remote add private-repo https://internal.dev False Use code with caution. Managing Your Remotes
| Option | Description | |--------|-------------| | --index INDEX | Insert the remote at a specific position in the remote list | | -f, --force | Force the definition of the remote even if a remote with the same name already exists | | --insecure | Allow insecure server connections when using SSL | | -ap ALLOWED_PACKAGES | Restrict the remote to only specific packages | | --recipes-only | Use the remote only for recipes, not binary packages | | -t local-recipes-index | Specify the type of remote | | --out-file OUT_FILE | Write the output of the command to the specified file |
Having multiple remotes configured is common in professional environments. For example: