We study a continuous-time problem of optimal public good contribution under uncertainty for an economy with an finite number of agents. Each agent can allocate his wealth between private consumption and repeated but irreversible contributions to increase the stock of some public good. We study the corresponding social planner problem and the case of strategic interaction between the agents and we characterize the optimal investment policies by a set of necessary and sufficient stochastic Kuhn-Tucker conditions. Suitably combining arguments from Duality Theory and the General Theory of Stochastic Processes, we prove an abstract existence result for a Nash equilibrium of our public good contribution game. Also, we show that our model exhibits a dynamic free rider effect. We explicitly evaluate it in a symmetric Black-Scholes setting with Cobb-Douglas utilities and we show that uncertainty and irreversibility of public good provisions do not affect free-riding.