Ever notice how people who are allergic to cats and pay them no attention are the ones cats come up to? And how people who bend over backwards to make friends with cats are the ones whose efforts are often rebuffed? It’s because generally, cats are naturally wary and would prefer to be the ones to take the social initiative.
That’s why, when interested in making friends with a cat, either at someone else’s home or outside, it’s best to play it cool. Don’t look the feline straight in the eye. Don’t make noises such as kissy or cooing sounds, either. And don’t thrust out your hand to start petting. A cat will see that as much too forward.
Instead, after a bit, if the cat seems somewhat interested, gently and stealthily offer a single finger to sniff. If the cat takes the bait, so be it. If not, be a good cat citizen and let it go. You don’t have to win over every cat you come across.