NOAUTH error

The server requires a password, and the connection hasn't authenticated.

Redis returns this error when the server requires a password, but your connection hasn't sent one yet. Until the connection authenticates, the server refuses almost every command, even PING.

NOAUTH Authentication required.

In redis-py, this error is AuthenticationError: Authentication required.

If the first command is HELLO, the error also says how to authenticate in the same command: NOAUTH HELLO must be called with the client already authenticated, otherwise the HELLO <proto> AUTH <user> <pass> option can be used to authenticate the client and select the RESP protocol version at the same time.

Example

> GET mykey
(error) NOAUTH Authentication required.
> AUTH <password>
OK
> GET mykey
"value"

How to fix it

Authenticate before you send other commands. Use AUTH with a password. If the server has access control list (ACL) users, give a username and a password: AUTH <username> <password>.

  • In redis-cli, give the credentials when you connect: redis-cli --user <username> --pass <password>. To type the password at a prompt instead, use --askpass.
  • In a client library, set the password, and the username if you have one, in the connection options. Most libraries also accept them in a connection URL: redis://<username>:<password>@<host>:<port>.

If you sent a password and got a different error, see WRONGPASS. For more about passwords and users, see Authentication.

RATE THIS PAGE
Back to top ↑