4

I am trying to setup Artifactory OSS repository with Conan. Everything seems to work fine in Artifactory console. In instructions of "Set me up" in Artifacory OSS it says:

To add the repository to your conan CLI, use:

conan remote add <REMOTE> http://192.168.0.1:8081/artifactory/api/conan/random-project

And replace with a name that identifies the repository (for example: "my-conan-repo")

To login use the conan user command:

conan user -p <PASSWORD> -r <REMOTE> <USERNAME>

In Conan I've followed the instruction:

$ conan remote add some-random-project http://192.168.0.1:8081/artifactory/api/conan/random-project
> WARN: Remotes registry file missing, creating default one in /home/homie/.conan/registry.txt

And when I try to add user:

$ conan user -p admin -r some-random-project admin
> ERROR: b'{\n  "errors" : [ {\n    "status" : 404,\n    "message" : "Not Found"\n     } ]\n}'

  Invalid server response, check remote URL and try again. [Remote: some-random-project]

Also, when I trying to access http://192.168.0.1:8081/artifactory/api/conan/random-project with GET request, it gives:

{
    "errors": [
        {
            "status": 404,
            "message": "Not Found"
        }
    ]
}

Before I was using Artifactory Pro and I was following the same procedure, and it worked.

Could you tell me what the problem is?

Ugnius Malūkas
  • 2,649
  • 7
  • 29
  • 42
  • 1
    The Artifactory that supports conan is not OSS, but "Community Edition" =CE, could you please make sure (maybe edit the question with details to it), the URL you used to download the Artifactory you are using? – drodri May 02 '18 at 20:04
  • I have installed OSS. Where could I find CE version? – Ugnius Malūkas May 03 '18 at 06:15
  • Because I have search for Community Edition, bet every time it links to Open Source edition. – Ugnius Malūkas May 03 '18 at 06:30
  • 2
    You can find all of the version and types of installations in this link: https://bintray.com/jfrog/product/JFrog-Artifactory-Cpp-CE/view – Ariel May 03 '18 at 07:58
  • You solved my problem! Maybe could you post your comment as an answer? – Ugnius Malūkas May 03 '18 at 09:25

2 Answers2

3

The problem is that you are not downloading the correct version of Artifactory:

  • Artifactory OSS: It has support for Java and generic repositories
  • Artifactory Community Edition (CE) for C/C++: It has support for Conan packages and generic repositories.

Make sure to download the Artifactory CE to use it with Conan, follow this link: https://bintray.com/jfrog/product/JFrog-Artifactory-Cpp-CE/view. The links from the conan.io downloads page should work too: https://www.conan.io/downloads.html

drodri
  • 5,157
  • 15
  • 21
0

If you want a nice and short way to start artifactory CE with docker-compose:

  1. checkout the official repo from artifactory: https://github.com/jfrog/artifactory-docker-examples.git
  2. navigate to docker-compose/artifactory
  3. edit the artifactory-oss.yml to point to the ce docker image, e.g.: docker.bintray.io/jfrog/artifactory-cpp-ce:6.13.1

The available tags are listed here: https://bintray.com/jfrog/reg2/jfrog%3Aartifactory-cpp-ce

...never the less, be sure to set your conan remote to the correct URI, which in case you run the Artifactory CE locally will look something like this: http://localhost/artifactory/api/conan/<repository_name>

chris polzer
  • 3,219
  • 3
  • 28
  • 44