user81923: 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:
server=1
rest=1
rpcauth=bob:b2dd077cb54591a2f3139e69a897ac$4e71f08d48b4347cf8eff3815c0e25ae2e9a4340474079f55705f40574f4ec99

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? 

user48884: 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


81923: <p>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: <a href="https://github.com/bitcoin/bitcoin/blob/v0.16.0/contrib/debian/examples/bitcoin.conf" rel="noreferrer">https://github.com/bitcoin/bitcoin/blob/v0.16.0/contrib/debian/examples/bitcoin.conf</a>. I've generated the rpcauth line and the password with
<code>./share/rpcauth/rpcauth.py bob</code></p>

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

<pre><code>server=1
rest=1
rpcauth=bob:b2dd077cb54591a2f3139e69a897ac$4e71f08d48b4347cf8eff3815c0e25ae2e9a4340474079f55705f40574f4ec99
</code></pre>

<p>I run</p>

<pre><code>./src/bitcoin-cli get blockchaininfo -rpcuser={...} -rpcpassword={...}
</code></pre>

<p>The answer is:</p>

<pre><code>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)
</code></pre>

<p>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...</p>

<p>Any clue? </p>
 48884: <p>You are using <code>bitcoin-cli</code> incorrectly.</p>

<p>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 <code>bitcoin-cli</code></p>

<p>So what you should actually be doing is </p>

<pre><code>src/bitcoin-cli -rpcuser={...} -rpcpassword={...} getblockchaininfo
</code></pre>
