Redis "WRONGPASS invalid username-password pair" in CI
The client did authenticate, but the credentials were wrong: "WRONGPASS invalid username-password pair or user is disabled." The password sent by the client does not match the server requirepass, or the ACL user is disabled.
What this error means
Redis rejects AUTH with "WRONGPASS invalid username-password pair or user is disabled." The connection is refused after auth even though the host and port are correct.
(error) WRONGPASS invalid username-password pair or user is disabled.
# python:
redis.exceptions.AuthenticationError: WRONGPASS invalid username-password pair
or user is disabled.Common causes
Client and service passwords drifted
The password in REDIS_PASSWORD used by the client differs from the --requirepass value on the service, often because one was updated and the other was not.
ACL user mismatch or disabled default user
With Redis ACLs, the default user may be disabled or a named user expected; sending the plain password against a disabled user yields WRONGPASS.
How to fix it
Use one source of truth for the password
- Reference the same secret in both the service
--requirepassand the client URL. - Avoid quoting or interpolation that mangles the value.
- Re-run and confirm AUTH succeeds with an authenticated PING.
services:
redis:
image: redis:7
options: --requirepass ${{ secrets.REDIS_PASSWORD }}
env:
REDIS_PASSWORD: ${{ secrets.REDIS_PASSWORD }}Match the ACL username when one is set
If the service defines an ACL user, include the username in the AUTH so the pair matches.
redis-cli -h localhost -p 6379 --user appuser --pass "$REDIS_PASSWORD" pingHow to prevent it
- Single-source the Redis password across service and client.
- Keep ACL usernames explicit when the default user is disabled.
- Test AUTH in a readiness step so drift fails fast.