The safest way to ensure a cat repellent recipe is harmless is to consult with a veterinarian before using it. In addition, check the ingredients against a list of substances that are toxic to cats.
Some substances that are harmless to humans are toxic to cats and dogs, including some essential oils and other ingredients used in untrustworthy repellent recipes. Check even seemingly harmless ingredients for safety. Be careful applying cat repellents to plants that the cat is eating. Some repellent recipes may be harmless if the cat touches them but can poison the cat if it eats them in sufficient quantities.
If you are trying to repel your own cat from certain places in the house, try using a commercial repellent from a trustworthy company. These are generally available in any pet store and often include the word "bitter" in the name.
Physical barriers also work to repel cats, especially from smaller areas. Limit your pet's access to the area or cover the area with double-sided tape or tinfoil, which cats generally dislike and avoid. If cats dig or defecate in loose dirt, put pebbles in the area to make digging unpleasant. Netting and pine cones can also act as safe deterrents.