From 13 Common Items for Getting Rid of Ants:
Lemons
You don’t need insecticides or ant traps to ant-proof your kitchen. Just give it the lemon treatment. First squirt some lemon juice on door thresholds and windowsills. Then squeeze lemon juice into any holes or cracks where the ants are getting in. Finally, scatter small slices of lemon peel around the outdoor entrance. The ants will get the message that they aren’t welcome.
Now, I'm highly skeptical of this specific piece of advice, having actually tried it (ants swarmed all over both the lemon slices and the places where puddles of lemon juice were).
Is there any scientific research that either backs up or refutes this advice?