Verify Artifactory Accessibility

Verify Artifactory is accessible by running a ping command with JFrog CLI.

Use this command to verify that Artifactory is accessible by sending an application-level ping. A successful run prints OK in the terminal.

To verify Artifactory is accessible:

  1. Ensure the prerequisites are met for your scenario (URL-only ping, or a configured server ID).

  2. Run a ping. When you pass a URL explicitly, use this form:

    jf rt ping --url=<ArtifactoryURL>

    Where:

    • <ArtifactoryURL> — Full Artifactory base URL (for example https://<your-subdomain>.jfrog.io/artifactory).

    Example:

    jf rt ping --url=https://your-instance.jfrog.io/artifactory
  3. Confirm the CLI prints OK. If you use a configured default server instead of --url, run jf rt ping with no arguments (or use the abbreviation jf rt p).

When to Use This Command

  • Verify connectivity when configuring Artifactory for the first time
  • Diagnose connection issues before running other JFrog CLI commands
  • Test authentication credentials without performing actual operations
  • Confirm Artifactory availability in CI/CD pipelines or monitoring scripts

Prerequisites

  • JFrog CLI installedDownload and install JFrog CLI if you haven't already.
  • For URL-based examples (Examples 1–7) — You need a valid Artifactory URL. No prior CLI configuration is required.
  • For server-ID and default-server examples (Examples 8–10) — You must have at least one server configured via jf config add. Run jf config show to list your configured servers and their IDs.
📘

Note

Start with Example 1, which requires only an Artifactory URL and no prior configuration. If you need to set up a server first, see Artifactory Authentication.


Command Parameters

ParameterCommand / Description
Command namert ping
Abbreviationrt p

Command Options

OptionDescription
--url[Optional] JFrog Platform URL. (for example: https://your-instance.jfrog.io)
--server-id[Optional] Server ID configured using the jf config command. If not specified, the default configured Artifactory server is used.
--user[Optional] JFrog username.
--password[Optional] JFrog password.
--access-token[Optional] JFrog access token.
--ssh-key-path[Optional] SSH key file path.
--ssh-passphrase[Optional] SSH key passphrase.
--client-cert-path[Optional] Client certificate file in PEM format.
--client-cert-key-path[Optional] Private key file for the client certificate in PEM format.
--format[Optional] Output format: json or table. When omitted, prints plain OK (backward-compatible). See jf rt output format.
--insecure-tls[Default: false] Set to true to skip TLS certificates verification.

Command Arguments

The command accepts no arguments.


Accessibility Parameter Examples

Example 1: Ping a Specific Server by URL

Pings the Artifactory server accessible at the specified URL. This is the most self-contained example — no prior CLI configuration required.

jf rt ping --url=https://your-instance.jfrog.io/artifactory

Expected output:

OK

Example 2: Ping with Username and Password Authentication

Pings the Artifactory server using username and password credentials.

jf rt ping --url=https://your-instance.jfrog.io/artifactory --user=myuser --password=mypassword

Expected output:

OK

Example 3: Ping with Access Token Authentication

Pings the Artifactory server using an access token.

jf rt ping --url=https://your-instance.jfrog.io/artifactory --access-token=your-access-token

Expected output:

OK

Example 4: Ping with SSH Key Authentication

Pings the Artifactory server using SSH key authentication.

jf rt ping --url=ssh://artifactory.mycompany.com:1339 --ssh-key-path=~/.ssh/id_rsa

Expected output:

OK

Example 5: Ping with SSH Key and Passphrase

Pings the Artifactory server using an encrypted SSH key.

jf rt ping --url=ssh://artifactory.mycompany.com:1339 --ssh-key-path=~/.ssh/id_rsa --ssh-passphrase=your-passphrase

Expected output:

OK

Example 6: Ping with mTLS Client Certificates

Pings the Artifactory server using mutual TLS authentication with client certificates.

jf rt ping --url=https://your-instance.jfrog.io/artifactory --client-cert-path=/path/to/client-cert.pem --client-cert-key-path=/path/to/client-key.pem

Expected output:

OK

Example 7: Skip Certificate Verification with Insecure TLS

Pings the Artifactory server while skipping TLS certificate verification.

🚧

Warning

Use --insecure-tls only for testing or in trusted internal environments. It disables certificate validation entirely and should never be used in production.

jf rt ping --url=https://your-instance.jfrog.io/artifactory --insecure-tls

Expected output:

OK

Example 8: Ping Default Server

Pings the configured default Artifactory server.

📘

Note

A server must be configured via jf config add before running this command. Run jf config show to confirm your default server is set.

jf rt ping

Expected output:

OK

Example 9: Ping a Specific Server by ID

Pings a configured Artifactory server by its server ID.

📘

Note

Replace my-server-id with your actual server ID. Run jf config show to list all configured servers and their IDs.

jf rt ping --server-id=my-server-id

Expected output:

OK

Example 10: Ping Using the Abbreviation

Pings the default Artifactory server using the command abbreviation.

📘

Note

A server must be configured via jf config add. Run jf config show to confirm your default server is set.

jf rt p

Expected output:

OK

Troubleshooting

ErrorLikely CauseResolution
server response: 401Invalid or expired credentials or access tokenRe-run jf config add or jf config edit to update credentials for your server.
Token failed verification: parseThe stored access token is malformed or expiredRe-run jf config add with a fresh token.
Server ID 'X' does not existThe server ID used with --server-id is not configuredRun jf config show to list valid server IDs.
Connection refused or other network errorWrong URL, or Artifactory is unreachableVerify the Artifactory URL and confirm the service is running.
certificate signed by unknown authoritySelf-signed or internal TLS certificateUse --insecure-tls in non-production environments, or install the CA certificate on your machine.
👍

Tip

When a command fails, the CLI prints a Trace ID in the output, for example:

[Info] Trace ID for JFrog Platform logs: 9933faa938e8b4fd

If you contact JFrog Support, include this Trace ID to help the support team locate the related server-side logs quickly.

Frequently Asked Questions

This section provides answers to frequently asked questions.

plusFAQs
Q: How do I verify that Artifactory is accessible from JFrog CLI?

A: Run jf rt ping --url=<ArtifactoryURL> for an ad hoc check, or run jf rt ping with no arguments to use your configured default server. See Example 1.

Q: What do I need before running jf rt ping?

A: For URL-only pings you only need a valid Artifactory URL. For server-ID or default-server pings you need at least one server configured with jf config add. See Prerequisites.

Q: What happens if jf rt ping returns a server response: 401 error?

A: A 401 response means your stored credentials or access token are invalid or expired. Re-run jf config add or jf config edit to update them. See Troubleshooting.

Q: What is the difference between using --url and --server-id with jf rt ping?

A: --url pings a server directly without needing a saved configuration. --server-id pings a server you already configured with jf config add, using its stored credentials.

Q: Can I skip TLS certificate verification when pinging Artifactory?

A: Yes, add --insecure-tls to the command. Use this only for testing or trusted internal environments, since it disables certificate validation entirely. See Example 7.

Related Topics


What’s Next

Connection verified. Now upload your first file to Artifactory.

Did this page help you?