Skip to content

Conan 2 remotes, uploads, and revision downloads ​

Conan 2 addresses recipe revisions, package IDs, and package revisions separately. Build and verify downloads with separate CONAN_HOME directories to avoid hiding server failures behind a local cache.

Create repositories ​

Run these Bash commands with an authenticated administrator arkactl profile and jq. Replace the example address with your HTTPS endpoint. Publish to Hosted. Group looks in Hosted first, then in Proxy. Grant the publishing account write access to Hosted and the consuming account read access to Group and the relevant members.

For each consuming or publishing identity, sign in with its profile and run arkactl --json tokens create --name conan-ci --expires-in-days 30 | jq -er .plaintext. Send the output directly to the CI secret store. Use a separate read and write token for the examples below.

bash
export ARKA_URL=https://packages.example.org
hosted=$(arkactl --json repo create --name conan-hosted --type hosted --format conan | jq -er .id)
proxy=$(arkactl --json repo create --name conan-proxy --type proxy --format conan \
  --upstream-url https://center2.conan.io | jq -er .id)
arkactl repo create --name conan-group --type group --format conan --member "$hosted,$proxy"
WRITE="$ARKA_URL/repository/conan-hosted"
READ="$ARKA_URL/repository/conan-group"

Register remotes ​

bash
conan remote add arka-write "$WRITE"
conan remote add arka-read "$READ"
# Enter the corresponding Arka API token as the password.
conan remote login arka-write "$ARKA_USER"
conan remote login arka-read "$ARKA_USER"
conan remote list

The URL passed to remote add ends at the repository name. Conan probes v1/ping or v2/ping, uses Basic against v2/users/authenticate to get a session, and sends Bearer credentials for resources. For a remote named wave, CI can inject CONAN_PASSWORD_WAVE and call conan remote login wave "$ARKA_USER".

Upload and download ​

bash
conan profile detect
conan create .
conan upload widget/1.2.3 --remote arka-write --confirm
conan list 'widget/1.2.3#*:*#*' --format=json
# Run from the consumer workspace after configuring arka-read.
conan download widget/1.2.3 --remote arka-read

When downloading by name, Conan enumerates binary package IDs under the recipe revision. The revision’s search endpoint returns these IDs, settings, and options. To target one binary, record the full widget/1.2.3#RREV:PACKAGE_ID#PREV reference from the upload, run conan download FULL_REFERENCE --remote arka-read, and use conan cache path FULL_REFERENCE to locate and verify the downloaded file.

SymptomWhat to check
Login failsCheck the remote base URL, account read access, and token expiry. Leave the v2 suffix to the client.
Download by name cannot find the binaryCheck the target recipe revision and confirm the binary was uploaded and is visible to the consumer.
Build yields a different package IDCheck host/build profiles, settings, options, and recipe revision. Rebuild with matching profiles and compare package IDs.

Conan 2 download and package references

Released under the Apache 2.0 License.