# Prove that for $\mathcal{F}$ a sheaf on manifold $M$ we have $H^0(\{U\},\mathcal{F})=\mathcal{F}(M)$

I want to prove that that for $\mathcal{F}$ a sheaf on manifold $M$ we have $H^0(\{U\},\mathcal{F})=\mathcal{F}(M)$, where $\{U\}$ is any locally finite open cover of $M$. (Note that I think we really only need connectedness of $M$ but I'm not sure about this)

It is clear that we have an injection $i:\mathcal{F}\to Z^0(\{U_{\alpha}\}_{\alpha\in I},\mathcal{F}): x\mapsto (x|_{U_\alpha})_{\alpha\in I}$. However, I don't see how to prove this is a surjection.

i.e. how to prove that for $x=(x_\alpha)_{\alpha\in I}\in Z^0(\{U_{\alpha}\}_{\alpha\in I},\mathcal{F})$ where $x_\alpha\in \mathcal{F}(U_\alpha)$ and $\partial x=0$, then there exists a $g\in \mathcal{F}(M)$ s.t. $\forall \alpha: x_\alpha=g|_{U_\alpha}$. In some concrete sheaves this seems to more or less come down to a form of the pasting lemma. However I do not see how to do this in an arbitrary sheaf using just the axioms.

One could try something like picking any $x_\alpha$ and finding a $g\in\mathcal{F}(M)$ s.t. $g|_{U_\alpha}=x_\alpha$. I think that the condition $x\in Z^0(\{U_{\alpha}\}_{\alpha\in I},\mathcal{F})$, which means: $$\forall \alpha,\beta:x_\alpha|_{U_\alpha \cap U_\beta}=x_\beta|_{U_\alpha \cap U_\beta} \tag{1}$$ would force $g|_{U_\beta}=x_\beta$ for all $\beta$ using the local finiteness condition somehow.

One problem is that I don't see why such a $g$ and $x_\alpha$ should exist in the first place. There are possibly elements in $\mathcal{F}(U_\alpha)$ that are not the restriction of a an element in $\mathcal{F}(M)$. Now it seems intuitive that the condition that $\partial x=0$ and the compatibility condition $(1)$ would force that all $x_\alpha$ are in fact restrictions of an element of $\mathcal{F}(M)$, but here the reasoning becomes circular...

A hint for solving this would appreciated.

edit: note that for finite covers this is also clear from the sheaf axiom: $$U,V\subset M\text{ open }, x\in U,y\in V s.t. x|_{U\cap V}=y|_{U\cap V} \text{ then exists } v\in \mathcal{F}(U\cup V) s.t. v|_U=x, v|_V=y$$