Cats often find their way into vegetable gardens because they enjoy using the soft dirt as a litter box and, occasionally, munching on the greens growing there. Obviously this activity can destroy many of the vegetables and render the remaining plants undesirable for consumption. There are several different ways to deter cats from entering your vegetable garden without harming them in any way.
Plant a patch of catnip to draw cats away from a vegetable garden. Use a gardening spade to dig up a small area of dirt 10 to 12 feet away from the vegetable garden. Plant catnip plants in the area. The catnip is much more desirable than the vegetables and should distract the cats.
Scatter used loose tea leaves on the exposed ground in the vegetable garden. The smell tends to keep cats out of a vegetable garden.
Drop a handful of citrus peels in a blender or food processor and pulse them until they're finely chopped. Spread the citrus peels in the garden; repeat weekly. The chopped peels will decompose very quickly, but their scent is offensive to cats.
Mix 2 parts cayenne pepper, 3 parts dry mustard and 5 parts flour, and dust the garden very lightly with the mixture. About 1/4 cup should more than suffice for small to medium backyard gardens; large gardens will require more. Store extra powder in an airtight container for later use. When cats get a whiff of the powder, they should be deterred. The pepper, mustard and flour will not sicken the cats, but it will encourage them to stay out.
Place a motion-activated sprinkler in the vegetable garden, near the area where the cats usually enter. The sprinkler will scare the cats, who usually aren't crazy about water.