Skip to content
Latchkey

Redis "NOAUTH Authentication required" in CI

The Redis service was started with a password (requirepass), but your client connected without credentials. Redis rejects every command with "NOAUTH Authentication required" until it authenticates.

What this error means

Commands fail with "NOAUTH Authentication required." even though the connection succeeds, because the server has a password set and the client sent none.

Terminal
(error) NOAUTH Authentication required.

Common causes

The container sets requirepass but the client omits it

A --requirepass argument or REDIS_PASSWORD-based config requires AUTH, but the connection string has no password.

The password is in the env but not in the URL

The secret exists in CI but the REDIS_URL used by the app does not embed it, so the client connects anonymously.

How to fix it

Include the password in the connection URL

Embed the password so every command authenticates.

.github/workflows/ci.yml
env:
  REDIS_URL: redis://:supersecret@127.0.0.1:6379/0

Authenticate explicitly with redis-cli

Pass the password to redis-cli when checking the service.

Terminal
redis-cli -h 127.0.0.1 -p 6379 -a supersecret ping

How to prevent it

  • Keep the Redis password and REDIS_URL in sync from one source.
  • Either run the test Redis without a password or always send AUTH.
  • Set the healthcheck to use -a so it does not fail with NOAUTH.

Frequently asked questions

What causes "Redis "NOAUTH Authentication required""?
A --requirepass argument or REDIS_PASSWORD-based config requires AUTH, but the connection string has no password.
How do I fix Redis "NOAUTH Authentication required"?
Embed the password so every command authenticates.

Related guides

References

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