Skip to content

Exception: This REST API is available only in Artifactory Pro #203

@Zerozzzz

Description

@Zerozzzz

Hi, when I operate repository, my process finished with exit. Here is my code

 Artifactory artifactory = ArtifactoryClientBuilder.create()
                .setUrl("http://192.168.1.**:8081/artifactory")
                .setUsername("admin")
                .setPassword("?????")
                .build();
DebianRepositorySettingsImpl settings = new DebianRepositorySettingsImpl();
        settings.setDebianTrivialLayout(true);

        Repository repository = artifactory.repositories()
                .builders()
                .localRepositoryBuilder()
                .key("NewRepoName")
                .description("new local repository")
                .repositorySettings(settings)
                .build();

        String result3 = artifactory.repositories().create(2, repository);

The exception is :```
Exception in thread "main" org.apache.http.client.HttpResponseException: {
"errors" : [ {
"status" : 400,
"message" : "This REST API is available only in Artifactory Pro (see: http://www.jfrog.com/addons.php). If you are already running Artifactory Pro please make sure your server is activated with a valid license key.\n"
} ]

That's what happens when I do any operation to User. I want to know that is my code wrong or something else. 

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions