Sometimes you don't have to do anything to them.
Ten years ago, on a trip to Alaska, my family and I stopped at a Canadian national park that featured a hot spring with bathing pools and a camping area. Signs warned of bears in the area being attracted to food in the camp sites. We saw one cross the road just before we got there.
No problem while we were there, but it was summer time and there were quite a few people, so the bears probably came in only at night.
A few years later, late in the fall, a black bear attacked a young boy at that park. His mother ran to his rescue, and the bear attacked her, inflicting fatal wounds. Another camper, a man, responding to her cries for help, tried to drive the bear off, and he was killed also.
The young boy survived. No cause for the attack was ever determined.
Regards, Shuckins