Most dogs know what "NO!" means and it at least makes them pause. I do have spray that's clipped to my handlebar, but I have had some that were FAST and trying to bite at my tires before I knew it.

All the dogs see is someone "running" past their territory - and in the dog world, if you are running that means you don't belong there. If you were walking and taking your time and strutting like you owned the place, they'd leave you alone. It's really weird. That's also why they bark if someone knocks at the door and stands there - if you belong there, you just walk right in and... no barking ensues.