Downloading Conan packages without user/channel (i.e. zlib/1.2.11 instead of zlib/1.2.11@conan/stable) does not work. Such packages are built on CCI and it will be good to be able to download them for debugging.
conan download 'zlib/1.2.11:76f87539fc90ff313e0b3182641a9bb558a717d2' to download a package without explicit user/channelERROR: Provide a valid full reference without wildcardsThe syntax for a short reference was given from Conan docs and from conan-center-index docs.
Anyway I tried following commands with the same error:
conan download 'zlib/1.2.11@_/_#76f87539fc90ff313e0b3182641a9bb558a717d2'conan download 'zlib/1.2.11@/:76f87539fc90ff313e0b3182641a9bb558a717d2'And this command with a different error "ERROR: Recipe not found: 'zlib/1.2.11'":
conan download 'zlib/1.2.11@#76f87539fc90ff313e0b3182641a9bb558a717d2'It is curious that if Conan is run with --package argument, it suggests to use the exactly failed command:
conan download --package 76f87539fc90ff313e0b3182641a9bb558a717d2 'zlib/1.2.11'
WARN: Usage of `--package` argument is deprecated. Use a full reference instead: `conan download [...] zlib/1.2.11:76f87539fc90ff313e0b3182641a9bb558a717d2`
ERROR: Provide a valid full reference without wildcards.
The same problem with upload command was fixed recently in https://github.com/conan-io/conan/issues/5822.
I suppose the check_valid_ref method should relax the requirements for short references..
Reproduced.
Yes, the workaround is to use the deprecated way:
conan download zlib/1.2.11@ -p 76f87539fc90ff313e0b3182641a9bb558a717d2
I am going to check possible fixes
Submitted a possible fix, maybe for 1.20
I ran into this same issue while trying to download the 7zip/19.00 package from conan-center.
I'm using version 1.29.0 of conan, with python3.6
Hi @jwinkler2083233
Can you please clarify exactly what command are you running, and the error message that you are getting? This was fixed and released, so it could be a regression or another bug, in that case it might be worth to create a new issue. Please tell the details and we will try to help. Thanks!
Edit: Just in case, this works fine here:
conan download 7zip/19.00@ -r=conan-center
WARN: Remotes registry file missing, creating default one in C:\Users\memsharded\.conan\remotes.json
Downloading conanmanifest.txt completed [0.10k]
Downloading conanfile.py completed [3.60k]
Downloading conan_export.tgz completed [0.23k]
Decompressing conan_export.tgz completed [0.00k]
7zip/19.00: Getting the complete package list from '7zip/19.00#0'...
7zip/19.00: Retrieving package 456f15897172eef340fcbac8a70811f2beb26a93 from remote 'conan-center'
Downloading conanmanifest.txt completed [0.82k]
Downloading conaninfo.txt completed [0.30k]
Downloading conan_package.tgz completed [4470.29k]
Decompressing conan_package.tgz completed [0.00k]
7zip/19.00: Package installed 456f15897172eef340fcbac8a70811f2beb26a93
I am also having this problem on Mac OS X with conan 1.34.0
michel@iMacGine ~ % conan download cgns/3.4.1 -r conan-center
ERROR: Provide a valid full reference without wildcards.
@memsharded can you reproduce it? Or is it only on MacOS?
$ conan download cgns/3.4.1@ -r conan-center
You need the @, to mark this is a package reference, even if it doesn't have user/channel. This will be changed in Conan 2.0, but at the moment it was necessary to not break.
With the @, it works. Thanks. But it's a lot of download. I'll try with just the recipe.