Adam Georgsson
Adam Georgsson

Reputation: 113

How can I automatically accept Artifactory EULA?

I have been using Artifactory OSS and set it up with a deploy script. The deploy script also uploads some images with curl to a generic repo immediately after setup. Now I need to upload docker images as well so I made the switch to Artifactory JCR. JCR won't accept my curl push until I have accepted the EULA. Is it possible to accept it automatically? I have been looking for a EULA flag in files and the database but without success.

My environment is a docker container with artifactory-jcr:6.17.0 in Kubernetes.

Upvotes: 3

Views: 2406

Answers (2)

Shay
Shay

Reputation: 336

For deployments using a scripts, you can sign the JCR EULA in a YAML configuration file you have prepared ahead. As JCR is based on Artifactory, the configuration files are usually similar.

Create a YAML file at $JCR_HOME/etc/artifactory/artifactory.config.import.yml

Add the below

GeneralConfiguration: 
  eula: 
    accepted: true
    
OnboardingConfiguration:
  repoTypes:
    - docker
    - helm

Make sure to format it as YAML before writing to the file

Upvotes: 6

Daniel Miakotkin
Daniel Miakotkin

Reputation: 141

One more option is to use this curl in the script, after JFrog Container Registry is installed:

curl -XPOST -vu username:password http://${ArtifactoryURL}/artifactory/ui/jcr/eula/accept

Upvotes: 11

Related Questions