cli
cli copied to clipboard
heroku redis:credentials gives an incorrect url for redis db without user
Do you want to request a feature or report a bug?
I would like to request a feature, but It could be seen as a bug as well.
What is the current behavior?
redis-cli -u $(heroku redis:credentials FOO --app my-app) --tls --insecure --bigkeys
returns:
Warning: Using a password with '-a' or '-u' option on the command line interface may not be safe.
AUTH failed: WRONGPASS invalid username-password pair or user is disabled.
What is the expected behavior?
% heroku --version
heroku/7.60.2 darwin-x64 node-v14.19.0
% uname -a
Darwin hostname 21.4.0 Darwin Kernel Version 21.4.0: Fri Mar 18 00:45:05 PDT 2022; root:xnu-8020.101.4~15/RELEASE_X86_64 x86_64
running macos 12.3.1
Workaround
redis-cli -u $(heroku redis:credentials FOO --app my-app | sed 's/://2') --tls --insecure --bigkeys
Notice I'm getting rid of the :
in the user:pass section since heroku redis doesn't provide a user anymore.