<p>I'd like to use Greg Maxwell's banlist for my Bitcoin node in Windows.</p>

<p>When I enter the commands however, I receive the following error message for every bitcoin-cli command:</p>

<blockquote>
  <p>bitcoin\bin>bitcoin-cli setban ###.###.###.###/32 add 31557600 error:
  Could not locate RPC credentials. No authentication cookie could be
  found, and RPC password is not set.  See -rpcpassword and
  -stdinrpcpass.  Configuration file: (C:\Users\admin\AppData\Roaming\Bitcoin\bitcoin.conf)</p>
</blockquote>

<p>How can I get this to work?</p>

CC BY-SA 4.0
2019-03-27T13:46:12.313Z
Possible duplicate of [bitcoin-cli could not locate RPC credentials](https://bitcoin.stackexchange.com/questions/74086/bitcoin-cli-could-not-locate-rpc-credentials)
MCCCS
CC BY-SA 4.0
2019-03-27T14:34:08.853Z
What's in your bitcoin.conf file? Did you change the data directory used by Bitcoin Core either via the -datadir option or in the GUI the first time you started it?
Ava Chow
CC BY-SA 4.0
2019-03-27T18:22:30.927Z
Actually the command worked now when referring to the correct bitcoin.conf file and data directory as parameters (thank you!) - however, the "setban" parameter throws a "Method not found" error message.
richey
CC BY-SA 4.0
2019-03-28T03:30:43.650Z
What version of Bitcoin Core are you using?
Ava Chow
CC BY-SA 4.0
2019-03-29T02:46:28.627Z
version 0.17.0.1
richey
<bitcoin-cli><windows>
banning nodes through bitcoin-cli in Windows
richey
# banning nodes through bitcoin-cli in Windows

(Asked by: username_0 on 2019-03-27)

I'd like to use Greg Maxwell's banlist for my Bitcoin node in Windows.

When I enter the commands however, I receive the following error message for every bitcoin-cli command:

> bitcoin\bin>bitcoin-cli setban ###.###.###.###/32 add 31557600 error:
> Could not locate RPC credentials. No authentication cookie could be
> found, and RPC password is not set. See -rpcpassword and
> -stdinrpcpass. Configuration file: (C:\Users\admin\AppData\Roaming\Bitcoin\bitcoin.conf)

How can I get this to work?

**Tags:** bitcoin-cli, windows

> **Comments:**
> **username_1**: Possible duplicate of [bitcoin-cli could not locate RPC credentials](https://bitcoin.stackexchange.com/questions/74086/bitcoin-cli-could-not-locate-rpc-credentials)  
> **username_2**: What's in your bitcoin.conf file? Did you change the data directory used by Bitcoin Core either via the -datadir option or in the GUI the first time you started it?  
> **username_0**: Actually the command worked now when referring to the correct bitcoin.conf file and data directory as parameters (thank you!) - however, the "setban" parameter throws a "Method not found" error message.  
> **username_2**: What version of Bitcoin Core are you using?  
> **username_0**: version 0.17.0.1  

---

## 0 answers

