jfrog-cli icon indicating copy to clipboard operation
jfrog-cli copied to clipboard

Unable to Determine Configuration Source for JFrog CLI on Specific Rig

Open sflink1 opened this issue 11 months ago • 0 comments

Describe the bug

We are encountering an issue with the JFrog CLI (jfrog.exe) in our CI environment. After transitioning to the new identity token-based authentication for Artifactory, one specific job on one of our rigs fails with the following error:

[Error] no JFrog Artifactory URL specified, either via the --url flag or as part of the server configuration

This issue is isolated to this specific job and rig. The same scripts, configuration, and jfrog.exe binary work without issues on other rigs and jobs. The configuration file (jfrog-cli.conf.v6) is present and correctly set up on the rig in question, but it appears that the JFrog CLI is either:

  1. Not reading the correct configuration file.
  2. Attempting to pull the configuration from an unknown or unexpected location.

Workaround Attempts:

  • Verified the configuration file exists and is correctly set up.
  • Explicitly set JFROG_CLI_HOME to point to the directory containing the configuration file.
  • Compared environment variables and paths between the rig and other rigs, but no significant differences were found.

There is probably a difference between the rigs somewhere, but it has been difficult to compare them.

Feature Request: If this is not a bug, we would like to request a feature enhancement, add debug output to explicitly show the path of the configuration file being used (or attempted to be used).

Additional Context: This issue was raised internally with our support team, and they were also surprised that the CLI does not provide visibility into the configuration file it is using. This lack of transparency makes debugging challenging.

Current behavior

The JFrog CLI fails with an error about a missing Artifactory server configuration, despite the configuration file being present and correctly set up. Debug logs (JFROG_CLI_LOG_LEVEL=DEBUG) do not provide any information about the configuration file being used or its location.

Reproduction steps

  1. Set up a system with multiple potential configuration paths for the JFrog CLI: Example paths:
  • %USERPROFILE%.jfrog\jfrog-cli.conf.v6
  • Another directory specified via the JFROG_CLI_HOME environment variable.
  • A directory containing an outdated or incorrect configuration file.
  1. Ensure one of the configuration files is invalid or missing required fields (e.g., missing the url field for the Artifactory server).
  2. Run a JFrog CLI command, such as: jfrog rt ping
  3. Observe that the CLI fails with an error like: [Error] no JFrog Artifactory URL specified, either via the --url flag or as part of the server configuration
  4. Enable debug logging by setting JFROG_CLI_LOG_LEVEL=DEBUG and re-run the command: set JFROG_CLI_LOG_LEVEL=DEBUG jfrog rt ping
  5. Observe that the debug logs do not indicate which configuration file the CLI is attempting to use.

Expected behavior

The JFrog CLI should:

  1. Clearly indicate which configuration file it is attempting to use.
  2. Use the configuration file located in the expected directory (e.g., %USERPROFILE%.jfrog\jfrog-cli.conf.v6 or the directory specified by JFROG_CLI_HOME).

JFrog CLI version

2.73.3

Operating system type and version

Windows 10

JFrog Artifactory version

No response

JFrog Xray version

No response

sflink1 avatar Apr 07 '25 11:04 sflink1