# CLI: Errors & Exit Codes

> Fix HTTPS certificate errors behind proxies or antivirus tools, distinguish canonical IDs from display names, and interpret meshive CLI exit codes.

Source: https://docs.meshive.ai/sdk-cli/cli/troubleshooting/

Reference for TLS certificate handling, resource identifier conventions, and script exit codes in the `meshive` CLI. See [CLI Overview & Options](/sdk-cli/cli/) for global flags and write confirmation rules.

## Certificate errors

`meshive` checks the API's certificate against the roots your operating system trusts (the Windows certificate store, the macOS keychain, the system CA files on Linux) and the public roots that ship with the `certifi` package. An antivirus or a company proxy that inspects HTTPS answers with a certificate signed by its own root; that root is normally in the operating system's store, so it is trusted too. This needs `meshive` **1.10.1** or later. Earlier releases trusted only the `certifi` roots.

| You might see | It means | Do |
| --- | --- | --- |
| `CERTIFICATE_VERIFY_FAILED ... unable to get local issuer certificate` on `meshive` 1.10.0 or earlier, while the console works in your browser | Something on your computer or network inspects HTTPS, and the CLI doesn't know its root. | Upgrade: `uv tool upgrade meshive`, `pipx upgrade meshive`, or `pip install -U meshive`, matching how you [installed](/sdk-cli/install-auth/#install) it. |
| A certificate error on 1.10.1 or later (on Windows and macOS the wording comes from the operating system, such as a certificate chain that ends in a root that is not trusted) | The root that signed the certificate isn't in your operating system's store. Common in a container, in WSL, or on a server behind a company proxy. | Add the root to the system store (your IT team's instructions, or `update-ca-certificates` on Debian and Ubuntu), or save it as a PEM file and set `SSL_CERT_FILE` to that file. |
| A certificate error, followed by `SSL_CERT_FILE is set` or `SSL_CERT_DIR is set` | When one of these variables is set, only the certificates it names are trusted. | Make sure the file includes the root that signed the certificate, or unset the variable. |

If you can't upgrade from 1.10.0 or earlier, this writes every root your operating system trusts to one file (on Windows, and on Linux and macOS where Python finds the system's roots):

```bash
python -c "import ssl; open('roots.pem', 'w').write(''.join(ssl.DER_cert_to_PEM_cert(c) for c in ssl.create_default_context().get_ca_certs(binary_form=True)))"
```

Then set `SSL_CERT_FILE` to the full path of `roots.pem` before running `meshive`.

> **Caution — Keep the check on:**
> Don't turn certificate verification off to get past this error. Your API key travels on this connection, and the check is what keeps it from being read on the way.

The Python SDK trusts the same roots. A client you give your own `transport=` takes its certificate settings from that transport instead. `meshive port-forward` checks the Pod address's certificate the same way.

## IDs vs names

List output shows two columns, and the distinction matters:

- **ID** — the canonical identifier (`namespace_name` for workspaces, `pod_name` for pods, the volume name for storages, `asset_…` for assets, numeric IDs for templates and servings, `task_…` for tasks, the machine id for machines). This is what you pass to the singular commands. It is **unique and stable**.
- **NAME** — the display alias you set. It is a *label*, not a key: it is **not guaranteed unique** and can change. Use `--name` to filter by it, but always address resources by their **ID**.

## Exit codes

| Code | Meaning |
| --- | --- |
| `0` | Success. |
| `1` | An API/auth error, a missing/invalid API key, `pod-create --wait` when the creation failed or the pod wasn't ready in time, `workspace-create --wait` when the workspace reached `error` or wasn't `running` in time, `workspace-delete` when the workspace isn't empty (and `workspace-delete --check` when it can't be deleted), or `pod-create --model-set` when the set's files couldn't be added or the answer didn't come in time. |
| `2` | Bad arguments (e.g. an unknown `--status`, a malformed `--since` date, `--limit` out of range, both a workspace and `--all`, or `--any-node` with a different `--placement`), or a write command that needed confirmation and got none (no TTY and no `--yes`, or you answered no), including a `pod-start` that needed data-loss consent and got no `--allow-data-loss`, a `pod-update` that needs `--allow-node-migration`, `--allow-data-loss`, `--drop-watched-folder` or `--ram` before it can go ahead, a `pod-update` or `storage-update` with nothing to change, and a `workspace-update` with a blank `--name`. |
