Redis-cli with password

Redis

Redis Problem Overview


I am using redis and trying to open CLI of redis using this:

$redis-cli -h 127.0.0.1 -p 6379 -a mysupersecretpassword

and getting and error :

> (error) NOAUTH Authentication required

why so ?

Redis Solutions


Solution 1 - Redis

My solution is put the password in single quotes like:

$redis-cli -h 127.0.0.1 -p 6379 -a 'thisizmy!PASS' 

Solution 2 - Redis

If you have a '$' in your password then it won't work. So set the password without the "$".

Solution 3 - Redis

If you have '$' in your password, make sure to enclose the password with single quotes. Then it will work.

Attributions

All content for this solution is sourced from the original question on Stackoverflow.

The content on this page is licensed under the Attribution-ShareAlike 4.0 International (CC BY-SA 4.0) license.

Content TypeOriginal AuthorOriginal Content on Stackoverflow
QuestionkeshawView Question on Stackoverflow
Solution 1 - RedisVincenteView Answer on Stackoverflow
Solution 2 - RedisKeshaw_pathakView Answer on Stackoverflow
Solution 3 - RedisShankar P SView Answer on Stackoverflow