Composting is possible in bear country, and will not be a bear attractant if maintained correctly. The key is to make sure that your compost bin is not smelly!
Go Big on Brown
The key to a healthy compost bin is equal proportions of BROWN materials (carbon rich) and GREEN materials (nitrogen rich). This means that you should add BROWNS every time you add kitchen scraps, covering the scraps completely in layers no more than 4 inches thick. See also the Department of Environmental Conservation webpage on Composting.
Browns include: dead leaves, grass clippings, wood chips, sawdust and low-quality household paper products that are shredded or cut up, like tissue paper, egg cartons, paper towels, junk mail, newspaper, paper bags, and cardboard rolls.
Greens include: kitchen scraps, vegetables, and small amounts of fruits.
If you're concerned about attracting bears, do not add meat, fish, dairy products, oil, unrinsed egg shells, cooked food, or large amounts of fruit. These items will attract bears and other animals long before they decompose. These items can be brought to a drop-off location in your town or thrown into the trash. Find your local waste management entity at 802recycles.com
You need to aerate and turn your compost bin for it to function properly and to prevent it from getting smelly and attracting bears. Use a stick or pitchfork to turn the contents of your bin at least every couple of weeks. Then, cover with more BROWNS. This will keep your compost from becoming smelly.
Keep it Moist
Ensure the compost is kept moist, like that of a wrung out sponge. If the contents are too dry, it will take too long to decompose and if too wet, the contents may begin to smell.
Try Bear-Resistant Containers
As a last resort, you might purchase a commercially available bear-resistant container made of hard plastic. There are some with screw-in lids that are practically bear-proof.