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.