How to configure JFrog CLI to work with Artifactory? [Video]

Andrey Granovsky
2021-01-28 08:09

In this short video we will learn how to configure JFrog CLI to work with Artifactory, including examples of uploading, downloading and deleting artifacts using JFrog CLI

Video Transcription

Hi. My name is Andre. I’m from JFrog Support. In this short video, I will show you how to configure JFrog CLI to work with Artifactory. Let’s start.

First, we need to download the JFrog CLI from download site. On this page you can choose installation type. Debian, Homebrew, NPM, Docker and other. This time, I will choose the Debian installation by clicking on the copy and pasting it to my terminal. As you can see, the installation now in progress. Let’s wait a few seconds until it’s done. After the installation, we’ll run the jfrog rt config command in order to configure JFrog CLI to work with Artifactory. First of all, we need to enter the Artifactory server ID. Now, we’ll need to provide an Artifactory URL. Next, and optional, we’ll need to provide a distribution URL. This time, we’ll leave it empty. Next, we can enter an Access Token or username and password. I will enter a username and password for this example. Now, we have two additional configurations that I will not be enabling this time. You can always return and configure them by rerunning the jfrog rt config command.

Let’s see in the Artifactory server if it is accessible after the configuration by running the jfrog rt ping command. We can see that the Artifactory server is configured good and we’re ready to start our work on with it.

So, I will show you a few examples of usage of Artifactory with JFrog CLI. First, we’ll upload an artifact Artifactory by running the jfrog rt, u, and the filename we want to upload to Artifactory, followed by the repository name we want to upload. As you can see, we upload the artifact successful. Now, let’s go to the Artifactory and check on the artifact. As you can see, here’s the generic local repository we uploaded to. Let’s refresh it and see the artifact we uploaded just now.

Next, we’ll download an artifact from Artifactory using CLI. We’ll enter the jfrog command rt, for Artifactory commands, dl for download, followed by the repository name and the filename we want to download. As you can see, we download the artifact successful.

The next and the last example is going to be deletion of artifact from Artifactory using the CLI. We’ll run the jfrog rt as previously, del for deleting, following by the repository name and the filename we want to delete. The CLI is want us to confirm we want to delete this artifact. Let’s press yes, and see, the deletion went successful. Let’s go back to Artifactory. Refresh, and we will see that artifact has been deleted.

That was my video on how to configure JFrog CLI with Artifactory. Thank you for watching, and I hope you have enjoyed. Feel free to leave your comments, feedback or questions in the comments section below.