{"id":8452,"library":"pulp-cli","title":"Pulp CLI","description":"Pulp CLI is a command-line interface for managing Pulp 3 resources and interacting with Pulpcore's REST API. It serves as a client for various Pulp plugins (e.g., pulp_ansible, pulp_file, pulp_rpm) to perform tasks like listing repositories, synchronizing content, and managing distributions. Currently at version 0.39.0, the library is under active development, and its status is considered 'beta', implying that future releases may introduce backwards-incompatible changes.","status":"active","version":"0.39.0","language":"en","source_language":"en","source_url":"https://github.com/pulp/pulp-cli","tags":["cli","pulp","repository management","software distribution","devops","system administration"],"install":[{"cmd":"pip install pulp-cli","lang":"bash","label":"Basic Installation"},{"cmd":"pip install pulp-cli[pygments]","lang":"bash","label":"With Syntax Highlighting"}],"dependencies":[{"reason":"Required Python interpreter version for pulp-cli.","package":"python","optional":false,"version_constraint":">=3.10, <3.15"}],"imports":[],"quickstart":{"code":"import os\n\n# Configure Pulp CLI. This creates or updates ~/.config/pulp/cli.toml\n# In a real scenario, avoid hardcoding credentials. Use environment variables or a .netrc file.\n# Example using environment variables:\n# export PULP_BASE_URL=\"http://localhost:8080\"\n# export PULP_USERNAME=\"admin\"\n# export PULP_PASSWORD=\"password\"\n\nbase_url = os.environ.get('PULP_BASE_URL', 'http://localhost:8080')\nusername = os.environ.get('PULP_USERNAME', 'admin')\npassword = os.environ.get('PULP_PASSWORD', 'password')\n\n# This command is meant to be run in a shell, not directly via Python subprocess\n# For demonstration, it's shown as a shell command.\nprint(f\"Setting up Pulp CLI configuration for {base_url}...\")\nprint(f\"pulp config create --base-url {base_url} --username {username} --password {password}\")\n\n# To verify connection and list available repositories\nprint(\"\\nVerifying Pulp server status:\")\nprint(\"pulp status\")\n\nprint(\"\\nListing file repositories (example):\")\nprint(\"pulp file repository list\")\n\n# To see full help for a command:\nprint(\"\\nTo view full help for the 'pulp' command:\")\nprint(\"pulp --help\")","lang":"python","description":"The Pulp CLI requires initial configuration to connect to a Pulp 3 server. This typically involves setting the base URL, username, and password, which can be done via `pulp config create` or environment variables. After configuration, you can verify the connection with `pulp status` and interact with various Pulp resources."},"warnings":[{"fix":"Regularly consult the official Changelog (e.g., on GitHub) before upgrading and test new versions in a non-production environment.","message":"Pulp CLI is currently in 'beta' status. Future releases may introduce backwards-incompatible changes, which could break existing scripts or automation.","severity":"breaking","affected_versions":"All versions, due to ongoing beta status."},{"fix":"If write operations are required and supported by your Pulp setup, append `--force` to the command, or use alternative tools like orcharhino management UI, Hammer CLI, or Foreman Ansible Modules for specific content types.","message":"For certain integrations, Pulp CLI is primarily read-only. Attempts to perform write operations (add, update, delete content) may result in an 'Error: Call aborted due to safe mode' message and a non-zero exit code.","severity":"gotcha","affected_versions":"All versions, depending on the Pulp server configuration and integrated tools."},{"fix":"Update scripts to remove these deprecated options. Consult the `pulp_rpm` plugin documentation for current best practices for checksum and GPG handling.","message":"Several options for `pulp_rpm` commands, including `--package-checksum-type`, `--metadata-checksum-type`, `--gpgcheck`, and `--repo-gpgcheck`, have been removed in version 0.33.0.","severity":"deprecated","affected_versions":">=0.33.0"}],"env_vars":null,"last_verified":"2026-04-16T00:00:00.000Z","next_check":"2026-07-15T00:00:00.000Z","problems":[{"fix":"If the operation is intended and safe mode can be overridden, append the `--force` global option to your Pulp CLI command (e.g., `pulp --force rpm repository update ...`).","cause":"Attempting to perform a write or modify operation (e.g., `pulp rpm repository update`) when the Pulp CLI, or the underlying Pulp server, is configured in a read-only 'safe mode' for that operation context.","error":"Error: Call aborted due to safe mode"},{"fix":"Verify that your `~/.config/pulp/cli.toml` or environment variables (e.g., `PULP_USERNAME`, `PULP_PASSWORD`, `PULP_TOKEN`) contain correct and active credentials. If using client certificates, ensure `--cert` and `--key` paths are correct and the server accepts them. Test basic connectivity with `pulp status`, which doesn't require authentication.","cause":"The Pulp CLI failed to authenticate with the Pulp server. This can be due to incorrect username/password, missing API tokens, issues with client certificates, or an inaccessible identity provider.","error":"Error: {'detail': 'Authentication credentials were not provided.'}"},{"fix":"Provide the path to your CA certificate bundle using the `--ca-cert` global option (e.g., `pulp --ca-cert /path/to/ca.crt ...`) or by setting the `PULP_CA_BUNDLE` environment variable. Alternatively, for testing *only*, you can disable SSL verification with `--no-verify-ssl` (not recommended for production).","cause":"The Python environment or Pulp CLI is unable to verify the SSL certificate of the Pulp server, often because the server uses a self-signed certificate or a CA certificate not trusted by the client system.","error":"requests.exceptions.SSLError: [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed"}]}