kovidgoyal/kitty · error · SystemExit
No password was found
Error message
No password was found
What it means
When --use-password=always, the client must find a password (from the file or --password-env); if none is found it exits via SystemExit 'No password was found'.
Source
Thrown at kitty/remote_control.py:516
else:
ans = sys.stdin.read().rstrip()
try:
tty_fd = os.open(os.ctermid(), os.O_RDONLY | os.O_CLOEXEC)
except OSError:
pass
else:
with open(tty_fd, closefd=True):
os.dup2(tty_fd, sys.stdin.fileno())
else:
try:
with open(resolve_custom_file(opts.password_file)) as f:
ans = f.read().rstrip()
except OSError:
pass
if not ans and opts.password_env:
ans = os.environ.get(opts.password_env, '')
if not ans and opts.use_password == 'always':
raise SystemExit('No password was found')
if ans and len(ans) > 1024:
raise SystemExit('Specified password is too long')
return ans
def get_pubkey() -> tuple[str, bytes]:
raw = os.environ.get('KITTY_PUBLIC_KEY', '')
if not raw:
raise SystemExit('Password usage requested but KITTY_PUBLIC_KEY environment variable is not available')
version, pubkey = raw.split(':', 1)
if version != RC_ENCRYPTION_PROTOCOL_VERSION:
raise SystemExit('KITTY_PUBLIC_KEY has unknown version, if you are running on a remote system, update kitty on this system')
from base64 import b85decode
return version, b85decode(pubkey)
View on GitHub (pinned to 6d5d0c4406)
Solutions
- Set the password environment variable (e.g. KITTY_RC_PASSWORD) matching --password-env
- Or write the password to the expected file path
- Or use --use-password=no if authentication is not required
Example fix
# before kitten @send-text --use-password always 'hi' # after KITTY_RC_PASSWORD=secret kitten @send-text --use-password always --password-env KITTY_RC_PASSWORD 'hi'
Defensive patterns
Strategy: validation
Validate before calling
import os assert os.environ.get(PASSWORD_ENV), 'password env var not set'
Prevention
- Provision --password-env in wrapper scripts
- Avoid --use-password always unless credentials are guaranteed
When it happens
Trigger: Running kitten remote-control with use_password='always' but no password file readable and the password_env variable unset/empty.
Common situations: Scripts requiring authentication without provisioning the password environment variable or file.
Related errors
- The remote control password was invalid: {data!r}
- Password usage requested but KITTY_PUBLIC_KEY environment va
- This should be run as kitten icat
- This should be run as `kitten notify ...`
- Remote control not enabled, this kitten should be run via a
AI-assisted analysis of kovidgoyal/kitty@6d5d0c4406 (2026-08-27).
Data as JSON: /api/errors/b655b0577ee8d93f.
Report an issue: GitHub.