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.
(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.
env:
REDIS_URL: redis://:supersecret@127.0.0.1:6379/0Authenticate explicitly with redis-cli
Pass the password to redis-cli when checking the service.
redis-cli -h 127.0.0.1 -p 6379 -a supersecret pingHow to prevent it
- Keep the Redis password and
REDIS_URLin sync from one source. - Either run the test Redis without a password or always send AUTH.
- Set the healthcheck to use
-aso it does not fail with NOAUTH.