Squirt them while riding with one hand.
If you are stopped or decide to stop, put your bicycle between you and dog. They do not know how to handle that situation; you can even charge them and they will generally run away as the bike comes near.
__________________
Land of the Free, Because of the Brave.