{"id":161,"date":"2020-12-11T12:41:49","date_gmt":"2020-12-11T12:41:49","guid":{"rendered":"http:\/\/www.matez.de\/?p=161"},"modified":"2020-12-11T12:42:32","modified_gmt":"2020-12-11T12:42:32","slug":"using-acl-with-redis-cli","status":"publish","type":"post","link":"https:\/\/www.matez.de\/index.php\/2020\/12\/11\/using-acl-with-redis-cli\/","title":{"rendered":"Using acl with redis-cli"},"content":{"rendered":"\n<p>I was setting up a <a href=\"https:\/\/redis.io\/\">Redis<\/a> server and ACL configuration and I was wondering, how to connect to this instance with <a href=\"https:\/\/redis.io\/topics\/rediscli\">redis-cli<\/a>, the command line client.<\/p>\n\n\n\n<p>Searching the internet did not help, as most examples only show, how to pass the password by using the <code>-a<\/code> parameter. And using the <code>-a<\/code> parameter does not work, because it only accepts the password, and not the username. So it is not passing through the given value to the AUTH command.<\/p>\n\n\n\n<p>But the help page gave me the clue to me. For example call <code>docker run --rm redis:6.0.5-alpine redis-cli --help<\/code> to display the help.<\/p>\n\n\n\n<p>So lets say you have setup a user <code>myuser<\/code> with password <code>myS3cret<\/code>, then you can call redis-cli as such: <code>docker run --rm redis:6.0.5-alpine redis-cli  --user myuser --pass myS3cret ping<\/code> and you will receive<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">Warning: Using a password with '-a' or '-u' option on the command line interface may not be safe.<br>PONG<\/pre>\n\n\n\n<p>Happy coding!<\/p>\n","protected":false},"excerpt":{"rendered":"<p>I was setting up a Redis server and ACL configuration and I was wondering, how to connect to this instance with redis-cli, the command line client. Searching the internet did not help, as most examples only show, how to pass the password by using the -a parameter. And using the -a parameter does not work, &hellip; <a href=\"https:\/\/www.matez.de\/index.php\/2020\/12\/11\/using-acl-with-redis-cli\/\" class=\"more-link\">Continue reading<span class=\"screen-reader-text\"> &#8220;Using acl with redis-cli&#8221;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":[],"categories":[1],"tags":[53,51,52],"_links":{"self":[{"href":"https:\/\/www.matez.de\/index.php\/wp-json\/wp\/v2\/posts\/161"}],"collection":[{"href":"https:\/\/www.matez.de\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.matez.de\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.matez.de\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.matez.de\/index.php\/wp-json\/wp\/v2\/comments?post=161"}],"version-history":[{"count":2,"href":"https:\/\/www.matez.de\/index.php\/wp-json\/wp\/v2\/posts\/161\/revisions"}],"predecessor-version":[{"id":163,"href":"https:\/\/www.matez.de\/index.php\/wp-json\/wp\/v2\/posts\/161\/revisions\/163"}],"wp:attachment":[{"href":"https:\/\/www.matez.de\/index.php\/wp-json\/wp\/v2\/media?parent=161"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.matez.de\/index.php\/wp-json\/wp\/v2\/categories?post=161"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.matez.de\/index.php\/wp-json\/wp\/v2\/tags?post=161"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}