This is one of those topics like flat tires. I'm afraid of responding for fear of jinxing myself.
I have never been bitten while riding a bike. When riding with Mrs. Grouch on our tandem, she talks baby talk to them and the dogs generally trot alongside until we leave their territory.
On one occasion I was riding on the tandem with my 12 year old son and about 5 other riders who were on single bikes. As we passed a farmhouse a pack of five dogs came running out at us. Each of the single bike riders grabbed for their weapon of choice - a pump, water bottles, one woman had some kind of high tech ultra sonic thingie. My son and I did NOTHING. When it settled out, each single bike rider had a dog barking at their heels while my son and I were ignored.
My conclusion is that dogs can, indeed, smell fear. The more fearful of dogs you are the more likely you are to be harassed.
I hope that I didn't just jinx myself.