-
Notifications
You must be signed in to change notification settings - Fork 43
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Artifactory - Split the main page into separate pages (#101)
- Loading branch information
Showing
8 changed files
with
247 additions
and
258 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
266 changes: 10 additions & 256 deletions
266
jfrog-applications/jfrog-cli/cli-for-jfrog-artifactory/README.md
Large diffs are not rendered by default.
Oops, something went wrong.
81 changes: 81 additions & 0 deletions
81
jfrog-applications/jfrog-cli/cli-for-jfrog-artifactory/authentication.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,81 @@ | ||
# Authentication | ||
## Overview | ||
When used with Artifactory, JFrog CLI offers several means of authentication: JFrog CLI does not support accessing Artifactory without authentication. | ||
|
||
## Authenticating with Username and Password / API Key | ||
|
||
To authenticate yourself using your JFrog login credentials, either configure your credentials once using the **jf c add** command or provide the following option to each command. | ||
|
||
| Command option | Description | | ||
| -------------- | --------------------------------------------------------------------- | | ||
| --url | JFrog Artifactory API endpoint URL. It usually ends with /artifactory | | ||
| --user | JFrog username | | ||
| --password | JFrog password or API key | | ||
|
||
For enhanced security, when JFrog CLI is configured to use a username and password / API key, it automatically generates an access token to authenticate with Artifactory. The generated access token is valid for one hour only. JFrog CLI automatically refreshed the token before it expires. The **jfrog c add** command allows disabling this functionality. This feature is currently not supported by commands which use external tools or package managers or work with JFrog Distribution. | ||
|
||
## Authenticating with an Access Token | ||
|
||
To authenticate yourself using an Artifactory Access Token, either configure your Access Token once using the **jf c add** command or provide the following option to each command. | ||
|
||
| Command option | Description | | ||
| -------------- | --------------------------------------------------------------------- | | ||
| --url | JFrog Artifactory API endpoint URL. It usually ends with /artifactory | | ||
| --access-token | JFrog access token | | ||
|
||
## Authenticating with RSA Keys | ||
|
||
*** | ||
|
||
**Note** | ||
|
||
> Currently, authentication with RSA keys is not supported when working with external package managers and build tools (Maven, Gradle, Npm, Docker, Go and NuGet) or with the cUrl integration. | ||
*** | ||
|
||
From version 4.4, Artifactory supports SSH authentication using RSA public and private keys. To authenticate yourself to Artifactory using RSA keys, execute the following instructions: | ||
|
||
* Enable SSH authentication as described in [Configuring SSH](https://jfrog.com/help/r/jfrog-platform-administration-Documentation/Managing-Ssh-Keys). | ||
* Configure your Artifactory URL to have the following format: `ssh://[host]:[port]` There are two ways to do this: | ||
|
||
* For each command, use the `--url` command option. | ||
* Specify the Artifactory URL in the correct format using the **jfrog c add** command. | ||
|
||
*** | ||
|
||
**Warning**\ | ||
\ | ||
**Don't include your Artifactory context URL** | ||
|
||
> Make sure that the \[host] component of the URL only includes the hostname or the IP, but not your Artifactory context URL. | ||
*** | ||
* Configure the path to your SSH key file. There are two ways to do this: | ||
* For each command, use the `--ssh-key-path` command option. | ||
* Specify the path using the **jfrog c add** command. | ||
|
||
## Authenticating using Client Certificates (mTLS) | ||
|
||
From Artifactory release 7.38.4, you can authenticate users using a client certificate ([mTLS](https://en.wikipedia.org/wiki/Mutual\_authentication#mTLS)). To do so will require a reverse proxy and some setup on the front reverse proxy (Nginx). Read about how to set this up [here](https://jfrog.com/help/r/jfrog-artifactory-documentation/Http-Settings). | ||
|
||
To authenticate with the proxy using a client certificate, either configure your certificate once using the **jf c add** command or use the --`client-cert-path` and`--client-cert-ket-path` command options with each command. | ||
|
||
*** | ||
|
||
**Note** | ||
|
||
> Authentication using client certificates (mTLS) is not supported by commands which integrate with package managers. | ||
*** | ||
|
||
Not Using a Public CA (Certificate Authority)? | ||
|
||
This section is relevant for you if you're not using a public CA (Certificate Authority) to issue the SSL certificate used to connect to your Artifactory domain. You may not be using a public CA either because you're using self-signed certificates or you're running your own PKI services in-house (often by using a Microsoft CA). | ||
|
||
In this case, you'll need to make those certificates available for JFrog CLI, by placing them inside the **security/certs** directory, which is under JFrog CLI's home directory. By default, the home directory is **\~/.jfrog**, but it can be also set using the **JFROG\_CLI\_HOME\_DIR** environment variable. | ||
|
||
**Note** | ||
|
||
1. The supported certificate format is PEM. | ||
2. Some commands support the **--insecure-tls** option, which skips the TLS certificates verification. | ||
3. Before version 1.37.0, JFrog CLI expected the certificates to be located directly under the **security** directory. JFrog CLI will automatically move the certificates to the new directory when installing version 1.37.0 or above. Downgrading back to an older version requires replacing the configuration directory manually. You'll find a backup if the old configuration under **.jfrog/backup** |
36 changes: 36 additions & 0 deletions
36
jfrog-applications/jfrog-cli/cli-for-jfrog-artifactory/curl-integration.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
# cUrl Integration | ||
## Overview | ||
|
||
Execute a cUrl command, using the configured Artifactory details. The command expects the cUrl client to be included in the PATH. | ||
|
||
> **Note** - This command supports only Artifactory REST APIs, which are accessible under https://\<JFrog base URL>/artifactory/api/ | ||
## Commands Params | ||
|
||
| | | | | ||
| ------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | - | | ||
| Command name | rt curl | | | ||
| Abbreviation | rt cl | | | ||
| Command options | | | | ||
| --server-id | <p>[Optional]<br><br>Server ID configured using the <strong>jf c add</strong> command. If not specified, the default configured server is used.</p> | | | ||
| Command arguments | | | | ||
| cUrl arguments and flags | <p>The same list of arguments and flags passed to cUrl, except for the following changes:<br><br>1. The full Artifactory URL should not be passed. Instead, the REST endpoint URI should be sent.<br>2. The login credentials should not be passed. Instead, the --server-id should be used.</p> | | | ||
|
||
Currently only servers configured with username and password / API key are supported. | ||
|
||
## Examples | ||
### Example 1 | ||
|
||
Execute the cUrl client, to send a GET request to the /api/build endpoint to the default Artifactory server | ||
|
||
``` | ||
jf rt curl -XGET /api/build | ||
``` | ||
|
||
### Example 2 | ||
|
||
Execute the cUrl client, to send a GET request to the /api/build endpoint to the configured my-rt-server server ID. | ||
|
||
``` | ||
jf rt curl -XGET /api/build --server-id my-rt-server | ||
``` |
28 changes: 28 additions & 0 deletions
28
jfrog-applications/jfrog-cli/cli-for-jfrog-artifactory/environment-variables.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
|
||
# Environment Variables | ||
|
||
Some of the Artifactory commands make use of the following environment variable: | ||
|
||
| | | | ||
| -------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | | ||
| **Variable Name** | **Description** | | ||
| **JFROG\_CLI\_MIN\_CHECKSUM\_DEPLOY\_SIZE\_KB** | <p>[Default: 10]<br><br>Minimum file size in KB for which JFrog CLI performs checksum deploy optimization.</p> | | ||
| **JFROG\_CLI\_RELEASES\_REPO** | <p>Configured Artifactory repository name to download the jar needed by the mvn/gradle command.<br>This environment variable's value format should be <code><server ID configured by the 'jf c add' command>/<repo name></code>.<br>The repository should proxy https://releases.jfrog.io.<br>This environment variable is used by the 'jf mvn' and 'jf gradle' commands, and also by the 'jf audit' command, when used for maven or gradle projects.</p> | | ||
| **JFROG\_CLI\_DEPENDENCIES\_DIR** | <p>[Default: $JFROG_CLI_HOME_DIR/dependencies]<br><br>Defines the directory to which JFrog CLI's internal dependencies are downloaded.</p> | | ||
| **JFROG\_CLI\_REPORT\_USAGE** | <p>[Default: true]<br><br>Set to false to block JFrog CLI from sending usage statistics to Artifactory.</p> | | ||
| **JFROG\_CLI\_SERVER\_ID** | Server ID configured using the config command, unless sent as a command argument or option. | | ||
| **JFROG\_CLI\_BUILD\_NAME** | Build name to be used by commands which expect a build name, unless sent as a command argument or option. | | ||
| **JFROG\_CLI\_BUILD\_NUMBER** | Build number to be used by commands which expect a build number, unless sent as a command argument or option. | | ||
| **JFROG\_CLI\_BUILD\_PROJECT** | JFrog project key to be used by commands that expect build name and build number. Determines the project of the published build. | | ||
| **JFROG\_CLI\_BUILD\_URL** | Sets the CI server build URL in the build-info. The "jf rt build-publish" command uses the value of this environment variable unless the --build-url command option is sent. | | ||
| **JFROG\_CLI\_ENV\_EXCLUDE** | <p>[Default: *password*;*secret*;*key*;*token*]<br><br>List of case insensitive patterns in the form of "value1;value2;...". Environment variables match those patterns will be excluded. This environment variable is used by the "jf rt build-publish" command, in case the --env-exclude command option is not sent.</p> | | ||
| **JFROG\_CLI\_TRANSITIVE\_DOWNLOAD\_EXPERIMENTAL** | <p>[Default: false]<br><br>Used by the "jf rt download" command. Set to true to download artifacts also from remote repositories. This feature is experimental and available on Artifactory version 7.17.0 or higher.</p> | | ||
| **JFROG\_CLI\_UPLOAD\_EMPTY\_ARCHIVE** | <p>[Default: false]<br><br>Used by the "jf rt upload" command. Set to true if you'd like to upload an empty archive when '--archive' is set but all files were excluded by exclusions pattern.</p> | | ||
|
||
*** | ||
|
||
**Note** | ||
|
||
> Read about additional environment variables at the [Welcome to JFrog CLI](../../README.md) page. | ||
*** |
Oops, something went wrong.