I once managed to fend off wild dogs with... cheese!
I was in Sicily one summer and decided to go visit a small ghost town (built for local farmers during Fascist times by the regime, then quickly abandoned) in the middle of nowhere. As soon as I rode into the center of the town and stopped my motorscooter, about six to eight dogs appeared and started barking and moving quickly my way. I tried to scare them away with the vehicle "gas" sound, but they just kept approaching and before I knew it, they had gotten quite close, so that it would have been too late to turn my motorscooter around and flee, had they decided to attack. I then remembered I had a big chunk of cheese in my backpack, so I quickly grabbed it, started tearing away pieces from it with my hands and throwing them around. The dogs seemed to calm down and went for the cheese wiggling their tails. I then spent the whole time exploring the ghost town with the pack calmly following me, as I would from time to time turn around and throw another piece of cheese to them. When I had no more cheese, I came back to my vehicle and left.
Thinking back at it now, I don't know if those dogs would have actually attacked me in the first place, but back then I got quite scared, that's for sure!