I set up my user and password but I keep getting this error.
bitcoin-cli migratewallet
error: Could not locate RPC credentials. No authentication cookie could be found, and RPC password is not set. Check -rpcpassword and -stdinrpcpass. Configuration file: (/home/ca/.bitcoin/bitcoin.conf)
Issues with RPC Credentials in Bitcoin Core
6 replies 46 views
You meant rpc username and password?
Because if so, those should be provided along with the bitcoin-cli command with --rpcuser and --rpcpassword args.
You may also utilize the cookie file if you prefer not to use rpc username and password,
To do that, don't set any of those in your bitcoin.conf file, just set server=1 without rpcuser and rpcpassword.
But the datadir should be provided in the command if it's not the default.
bitcoin-cli -rpcuser=user -rpcpassword=mypassword getblockchaininfo
error get:
Authorization failed: Incorrect rpcuser or rpcpassword
but the user and password is correct.
Hmm, try to double-check your bitcoin.conf file in /home/ca/.bitcoin/bitcoin.conf if it's really the case.
Or have you restarted your node after changing the settings in your config file?
Because if not, you must restart it for the new settings to apply.
If you're having trouble with rpc user and password, try to use the ".cookie file" method.
i have tried to restart the bitcoin core, but nothing changed.
my 8332 port: JSONRPC server handles only POST requests
I use Bitcoin Core version v30.0.0 on fedora is anyone else have the same problem.
I'm only able to reproduce it by setting a random rpcpassword arg in the command while not using rpcpassword in the config file.
Or by actually using mismatched credentials.
Check your debug.log file for the applied configs, look for the currently applied rpcuser and rpcpassword or if it's actually applied.
The lowest-most lines containing "Config file arg" should be the working config from your bitcoin.conf file.
Make sure bitcoin-cli is pointing to the right datadir otherwise it wont see your setting. Your datadir is: /home/ca/.bitcoin