proxy to conan-center: Remote from remote is not json, but 'application/octet-stream'

I set up a jfrog artifactory with a conan "remote" repository to proxy the official conan-center repository. I see three different conan-center URLs, depending on with source I read: center.conan.io, conan.io/center, and conan.bintray.com. I used the latter, conan.bintray.com, as it's the default URL that artifactory proposes for a remote repository of type conan. I didn't change any settings.

Then I tried to do a conan install .. as I'd do normally on my local builds, but I removed the official conan-center repository that comes by default, and added my proxy repository (remote repository, as jfrog calls it)

$ conan remote list
conan-center-remote: http://conan.foo.com:8081/artifactory/conan-center-remote/ [Verify SSL: True]

And then I get this error:

$ conan install ..
Configuration:
[settings]
arch=x86_64
arch_build=x86_64
build_type=Release
compiler=gcc
compiler.libcxx=libstdc++
compiler.version=10
os=Linux
os_build=Linux
[options]
[build_requires]
[env]

libavrocpp/1.10.1: Not found in local cache, looking in remotes...
libavrocpp/1.10.1: Trying with 'conan-center-remote'...
ERROR: {
  "conan_export.tgz" : "https://conan.bintray.com/artifactory/api/conan/conan-center-legacy/v1/files/_/libavrocpp/1.10.1/_/5413c1d93780b9806d4ffcf0e9436409/export/conan_export.tgz",
  "conan_sources.tgz" : "https://conan.bintray.com/artifactory/api/conan/conan-center-legacy/v1/files/_/libavrocpp/1.10.1/_/5413c1d93780b9806d4ffcf0e9436409/export/conan_sources.tgz",
  "conanmanifest.txt" : "https://conan.bintray.com/artifactory/api/conan/conan-center-legacy/v1/files/_/libavrocpp/1.10.1/_/5413c1d93780b9806d4ffcf0e9436409/export/conanmanifest.txt",
  "conanfile.py" : "https://conan.bintray.com/artifactory/api/conan/conan-center-legacy/v1/files/_/libavrocpp/1.10.1/_/5413c1d93780b9806d4ffcf0e9436409/export/conanfile.py"
}

Response from remote is not json, but 'application/octet-stream'. [Remote: conan-center-remote]

Why do I get this error?

Upvotes: 3

Views: 1734

Answers (1)

M. Zhu
M. Zhu

Reputation: 51

My solution to this problem was to change the remote URL from https://your.jfrog.url/artifactory/your-conan-proxy-name/ to https://your.jfrog.url/artifactory/api/conan/your-conan-proxy-name/

Then change the conan local config: conan config set general.revisions_enabled=1

Upvotes: 1

Related Questions