The “Test” button in Artifactory is just the response of an HTTP HEAD request to the URL. Following the instructed here, we need to download the Elastic-Search public gpg-key in order to add this URL as a remote repository.
To download the GPG file please run the following command:
$ curl -O https://packages.elastic.co/GPG-KEY-elasticsearch
Then we can easily upload it to a generic local repository in our Artifactory server, afterward we need to add the gpgkey URL pointing to the GPG key file that can be found in the generic repository as the following sample of artifactory.repo file:
[Artifactory] name=Artifactory baseurl=http://user:password@<artifactory_URL>/artifactory/rpm-remote/ enabled=1 gpgcheck=0 #Optional - if you have GPG signing keys installed, use the below flags to verify the repository metadata signature: gpgkey=http://user:password@<artifactory_URL>/artifactory/generic-local/GPG-KEY-elasticsearch repo_gpgcheck=1