Redis "WRONGPASS invalid username-password pair" in CI
Redis received an AUTH attempt but the password (or ACL user) is wrong, so it returns "WRONGPASS". The client did send credentials; they just do not match what the container was started with.
What this error means
AUTH or the first command fails with "WRONGPASS invalid username-password pair or user is disabled." while the connection itself works.
(error) WRONGPASS invalid username-password pair or user is disabled.Common causes
The client password differs from requirepass
The value in the connection URL does not match the --requirepass the container was launched with.
An ACL user name or password is wrong
On Redis 6+, connecting as a named ACL user with the wrong password (or a disabled user) yields WRONGPASS rather than NOAUTH.
How to fix it
Match the client URL to the container password
Use the same password on both sides.
services:
redis:
image: redis:7
options: >-
--requirepass supersecret
--health-cmd "redis-cli -a supersecret ping"
ports: ['6379:6379']
env:
REDIS_URL: redis://:supersecret@127.0.0.1:6379/0Use the correct ACL username and password
If you use ACLs, include both the username and password in the URL.
redis-cli -h 127.0.0.1 -p 6379 --user app --pass app_pw pingHow to prevent it
- Define the Redis password once and reuse it in the URL and healthcheck.
- Keep ACL user definitions and client credentials in sync.
- Store the password as a CI secret, not inline in multiple places.