When the couchbase server password has special characters like | and ’ ’ then any escaping of special chars or parsing doesn’t work it shows unexpected behaviour.
Suggest possible solution or if it is an unhandled issue
When the couchbase server password has special characters like | and ’ ’ then any escaping of special chars or parsing doesn’t work it shows unexpected behaviour.
Suggest possible solution or if it is an unhandled issue
Can you show what you are doing? And what shell? If the password contains characters that have special meaning to the shell, they need to be escaped from the shell. Or quoted.
I am trying to do export and import using cbexport and cbimport executables with a command like this,
Couchbase export command: cbexportjson --cluster https://localhost:8091 --username abcd --password b|TrItQDd6$P5BxK --bucket test --output /data/test.dmp --log-file /data/test.dmp.log --no-ssl-verify --verbose -f lines --scope-field testScope --collection-field testCollection --include-data test.main
The password in my case can have any special characters and I have observed unexpected behavior with some special characters like ',", |. Sometimes it works and sometimes it gives this error, “CLI user reminder \xe2\x80\x93 if the password includes special characters, the password should be enclosed in quotes to prevent issues due to interaction with the shell”
I tried fixing it by enclosing the password in quotes but it doesn’t work as the password can have any no of single and double quotes.
Refer to the shell documentation on how to escape special characters. On the shell I use (zsh), it’s sufficient to put a backslash in front of every character…
% set \]\'\a\|\\\"\`\ \x
% echo $1
]'a|\"` x