Skip to content
Latchkey

JFrog "jf: command not found" (setup-jfrog-cli) in CI

The shell could not find a jf executable on PATH. The JFrog CLI was never installed on the runner, or the setup step ran after the step that calls jf.

What this error means

A step running jf ... fails with "jf: command not found" and exit code 127, usually because setup-jfrog-cli is absent or ordered after the jf command.

jf
/home/runner/work/_temp/script.sh: line 1: jf: command not found
Error: Process completed with exit code 127.

Common causes

setup-jfrog-cli step is missing

The workflow calls jf without first running the action that installs the CLI, so no jf binary exists on PATH.

The jf call runs before setup

Steps run in order; a jf command placed above the setup-jfrog-cli step executes before the binary is on PATH.

How to fix it

Add setup-jfrog-cli before any jf step

  1. Add the jfrog/setup-jfrog-cli action early in the job.
  2. Set JF_URL and JF_ACCESS_TOKEN in its env so it also configures auth.
  3. Place all jf commands after this step.
.github/workflows/ci.yml
- uses: jfrog/setup-jfrog-cli@v4
  env:
    JF_URL: ${{ vars.JF_URL }}
    JF_ACCESS_TOKEN: ${{ secrets.JF_ACCESS_TOKEN }}
- run: jf --version

Install the CLI directly if not using the action

On a container or non-Actions runner, install the jf binary from the official script before use.

Terminal
curl -fL https://install-cli.jfrog.io | sh
jf --version

How to prevent it

  • Always run setup-jfrog-cli as the first JFrog-related step.
  • Order jf commands after the CLI install step.
  • Pin the setup action to a major version so installs are reproducible.

Frequently asked questions

What causes ""jf: command not found""?
The workflow calls jf without first running the action that installs the CLI, so no jf binary exists on PATH.
How do I fix "jf: command not found"?
Add setup-jfrog-cli before any jf step

Related guides

References

Latchkey auto-heals failures like this one - detected, fixed, and retried without you. Start free → 30-day trial · No credit card