"Fresh olives are pretty much inedible because they are chock full of a bitter phenolic substance called oleuropein. The olive tree was first cultivated in the eastern Mediterranean around 5,000 years ago, probably as a source of oil. Per Harold McGee, olive fermentation may have been discovered when early peoples learned to remove the bitterness by soaking the fruit in water.
By Roman times, the soaking water was supplemented with alkaline wood ash, which cuts the soak from weeks to hours. Alkaline conditions actually break oleuropein down, and also breach the waxy outer cuticle and dissolve cell walls. This makes them more permeable to the salt brine that follows, after a wash and acid treatment to neutralize alkalinity, and helps fermentation go faster. Lactic acid bacteria are the main fermenters, though some yeasts also grow and contribute to the aroma. Olives may be debittered and fermented while still green aka Spanish”style, the major commercial type, or once their skin has turned dark with purplish anthocyanins, when they are less bitter.
Olives are also fermented without any preliminary leaching or alkaline treatment, but this results in a different kind of fermentation. Nutrients for the microbes in the brine diffuse very slowly from the flesh through the waxy cuticle, and the intact phenolic materials inhibit microbial growth. So the temperature is kept low and yeasts rather than lactic acid bacteria dominate in a slow alcoholic fermentation that takes as long as a year. This method is usually applied to black ripe olives- Greek, Italian Gaeta, French Niçoise."