{
  "schema_version": 2,
  "id": "develop/reference/errors/common/noauth",
  "title": "NOAUTH error",
  "url": "https://redis.io/docs/latest/develop/reference/errors/common/noauth/",
  "summary": "The server requires a password, and the connection hasn't authenticated.",
  "tags": [
    "docs",
    "develop",
    "stack",
    "oss",
    "rs",
    "rc",
    "oss",
    "kubernetes",
    "clients"
  ],
  "last_updated": "2026-11-02T15:10:28+01:00",
  "page_type": "content",
  "content_hash": "c1502433008e0b6bdadaa590924fa3d325a8b9d567fdae92e878b38c13bc3abb",
  "sections": [
    {
      "id": "overview",
      "title": "Overview",
      "role": "overview",
      "text": "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`.\n\n[code example]\n\nIn redis-py, this error is `AuthenticationError: Authentication required.`\n\nIf the first command is [`HELLO`](https://redis.io/docs/latest/commands/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`."
    },
    {
      "id": "example",
      "title": "Example",
      "role": "example",
      "text": "[code example]"
    },
    {
      "id": "how-to-fix-it",
      "title": "How to fix it",
      "role": "content",
      "text": "Authenticate before you send other commands. Use [`AUTH`](https://redis.io/docs/latest/commands/auth) with a password. If the server has access control list (ACL) users, give a username and a password: `AUTH <username> <password>`.\n\n- **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`.\n- **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>`.\n\nIf you sent a password and got a different error, see [`WRONGPASS`](https://redis.io/docs/latest/develop/reference/errors/common/wrongpass). For more about passwords and users, see [Authentication](https://redis.io/docs/latest/operate/oss_and_stack/management/security#authentication)."
    }
  ],
  "examples": [
    {
      "id": "overview-ex0",
      "language": "plaintext",
      "code": "NOAUTH Authentication required.",
      "section_id": "overview"
    },
    {
      "id": "example-ex0",
      "language": "plaintext",
      "code": "> GET mykey\n(error) NOAUTH Authentication required.\n> AUTH <password>\nOK\n> GET mykey\n\"value\"",
      "section_id": "example"
    }
  ]
}
