I'm running a bitcoind 0.16 and it seem working, blockchain in sync etc.. I've used the "new" rpcauth, which is non deprecated so kind of referennce as explained here: https://github.com/bitcoin/bitcoin/blob/v0.16.0/contrib/debian/examples/bitcoin.conf. I've generated the rpcauth line and the password with ./share/rpcauth/rpcauth.py bob

Copied the rpc line in the ~/.bitcoin/bitcoin.conf file and stored the password elsewhere. The conf file have this [rpc] section:


I run

./src/bitcoin-cli get blockchaininfo -rpcuser={...} -rpcpassword={...}

The answer is:

error: Could not locate RPC credentials. No authentication cookie could be found, and RPC password is not set.  See -rpcpassword and -stdinrpcpass.  Configuration file: (/home/bitcoin/.bitcoin/bitcoin.conf)

It's like the cli can't read the rpc credentials from the command line. It's not saying "credentials are wrong". Also the conf file is the correct one so...

Any clue?


You are using bitcoin-cli incorrectly.

The command line arguments come before the RPC command. Anything that comes after the RPC command will be interpreted as arguments for the RPC, not arguments to bitcoin-cli

So what you should actually be doing is

src/bitcoin-cli -rpcuser={...} -rpcpassword={...} getblockchaininfo
  • Rather: src/bitcoin-cli -rpcuser={...} -rpcpassword={...} getblockchaininfo – Thorkil Værge May 11 at 16:13

Try to use the old authentication way which i always been using and has no issue


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.