As you might know, Costco stores let you only use American Express credit cards. While you can use your Visa/MasterCard/Discover on their web site, if you go to the physical Costco store for anything, including gasoline, it is AmEx only.
This is not really a problem, unless you have a credit card other than AmEx that gives you cashback, miles or points. But there is a simple trick you can utilize to use any credit card to make your purchases at Costco, including gasoline, car batteries, tires and anything else.
Costco Cash Card
You basically go to costco's web site and search for "cash card". You can buy a "Costco Cash Card" which works as a gift card in denominations of $25, 50, 100, 200, 300 etc up to $1,000. When you check out, you pay with the credit card that gives you your miles/points/cash back. Then, you receive the costco cash card and use it at Costco locations.
Problem solved. The only drawback is if your credit card gives you good perks for a specific type of purchase, e.g. 5% back on gasoline, you are out of luck and will only get the general level of rewards.