The most harmless deterant I know is the smell of citrus, dogs hate it.
When we were training our dog not to be try and fight our neighbours dog (over a fence...)
we put a collar on him which sprays citrus scent whenever he barks.
That shut him up.. he learnt that bark = bad smell. :]
It doesn't harm the dog, they just don't like the smell.