Page tree
Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View thecurrent version.

Compare with CurrentView Page History

« PreviousVersion 6下一个”

Overview

This page describes how to use JFrog CLI with JFrog Mission Control.

Syntax

$ jfrog mc command-name arguments global-options command-options

地点:

command-name
The command to execute. Note that you can use either the full command name or its abbreviation.
global-options

A set of global options that may be used for all commands:

--url:(Mandatory) The Mission Control URL.

--user:(Optional) The Mission Control user.

--password:(Optional) The Mission Control password.

Use the config command

To avoid having to set these for every command, you may set them once using theconfigcommand and then omit them for every following command.

command-options
A set of options corresponding to the command
arguments
A set of arguments corresponding to the command


Page Contents


Commands

The following sections describe the commands available in the JFrog CLI for use with JFrog Mission Control.

We strongly recommend running theconfigcommand right after installing the JFrog CLI to avoid having to pass in the Mission Control URL and login credentials for every command.

Artifactory Instance Actions

This command performs different actions on Artifactory instances. The specific action is determined by a secondary command and its corresponding arguments and options as described in the following sections.
Command name
rt-instances
Abbreviation
rti

Adding an Instance

Command name
add
Description
Adds an Artifactory instance.
Command arguments
Artifactory instance name The name that the Artifactory instance should be given in Mission Control.
命令选项
--rt-url

[Mandatory]

The Artifactory URL
--rt-user

[Mandatory]

An Artifactory admin user name
--rt-password

[Mandatory]

The corresponding Artifactory admin password - optionally encrypted
--desc

[Optional]

A description for the Artifactory instance
--location

[Optional]

The Artifactory instance location

Example

jfrog mc rti add my-arti --rt-url=http://10.100.1.127 --rt-user=admin --rt-password=password

Removing an Instance

Command name
remove
Description
Removes an Artifactory instance.
Command arguments
Artifactory instance name The name of the Artifactory instance (as defined in Mission Control) to remove.
命令选项

--quiet

[Default: false]
When true, skips the default confirmation message.

Example

jfrog mc rti remove my-arti --quiet=true

Attaching a License

Command name
attach-lic
Description
Attaches (and optionally installs) a license to the specified Artifactory instance and removes it from the specified bucket.
Command arguments
Artifactory instance name The name of the Artifactory instance to which the license should be attached.
命令选项

--bucket-id

[Mandatory]
Theid or nameof the bucket from which the license should be provisioned.

--node-id

[Optional]

If the Artifactory instance specified is actually a cluster, this parameter specifies which node in the cluster should be activated with the license.
--license-path

[Optional]

Specifies the full path to the license file. If not specified, the license is printed to standard output.
--override

[Default: false]

When true, overrides any license file currently existing in the path specified in the--license-pathparameter.
--deploy

[Default: false]

When true, installs the license in the Artifactory instance.

Example

Assign a license from the specified bucket to the specified Artifactory instance (my-arti). The license is displayed on standard output.

jfrog mc rt-instances attach-lic my-arti——斗id=abcdefg

Detaching a License

Command name
detach-lic
Description
Detaches a license from the specified Artifactory instance and returns it to the specified bucket.
Command arguments
Artifactory instance name The name of the Artifactory instance from which the license should be detached
命令选项

--bucket-id

[Mandatory]
The id of the bucket from which the license should be provisioned.

--node-id

[Optional]
If the Artifactory instance specified is actually a cluster, this parameter specifies from which node in the cluster the license should be removed.

Example

jfrog mc rt-instances detach-lic my-arti --bucket-id=abcdefg

配置

This command is used to configure the JFrog CLI with the default Mission Control URL and login credentials which should be used in the other commands so that you don't have to pass them in each time. These values are defaults for each command and can be overridden per command by passing in alternative values for the Mission Control URL and login credentials. The values configured are saved in~/.jfrog/jfrog-cli.conf.

Command name
config
Abbreviation
c
命令选项

--url [Optional] The default Mission Control URL to be used for the other commands.
--user [Optional] The default user to be used for the other commands.
--password

[Optional] The default password to be used for the other commands.

Command arguments
If no arguments are passed in, the command will configure the Mission Control URL, user and password through the command options or through the interactive prompt
show

Shows the stored configuration.

clear Clears the stored configuration.

Examples

Example 1

Configure the Mission Control URL, user and password using the interactive prompt.

$ jfrog mc c
Example 2

Configure the Mission Control URL, user and password by passing them in as command options.

$ jfrog mc c --url=http:// --user=admin --password=password
Example 3

Show, and then clear the configuration details.

$ jfrog mc c show $ jfrog mc c clear

  • No labels