It is known that any holomorphic bundle of any rank over a noncompact Riemann surface is trivial. A proof can be found in Forster's "Lectures on Riemann surfaces", section 30.

Let $E$ be a holomorphic vector bundle over a compact Riemann surface $X$ with gauge group $G$. A consequence of the above theorem is the restriction $E|_{X-\{p\}}$ for any point $p\in X$ is a trivial bundle. Thus $E$ can be recovered by specifying the transition function $g: D\cap (X-\{p\}) \rightarrow G$ where $D$ is a small disk containing $p$.

Is this correct? If not, could you give a counter-example? I am mainly interested in learning about the moduli space of holomorphic bundles over $X$ in a concrete way, e.g. using transition functions.

If the argument is correct, then there is another issue. Consider a one-parameter family of transition functions $g_{\alpha\beta}(t)$. Imposing the cocycles condition on $g_{\alpha\beta}' := g_{\alpha\beta}+\epsilon\dot{g}_{\alpha\beta}$ where $\epsilon$ is infinitesimal, one finds $\dot{g}_{\alpha\beta}$ defines a class in $H^1(X,\mathfrak{g})$. Thus the tangent space at $[E]$ to the moduli space of bundles $Bun_G(X)$ is $H^1(X,\mathfrak{g})$; equivalently, $$T_{[E]}^\ast Bun_G(X) \cong H^0(X,\mathfrak{g}\otimes K_X)$$ by Serre's duality. This is the standard argument in constructing e.g. the Hitchin's system.

But now as we minimally only have one transition function, we have no cocycle conditions to impose. How do I still see that $T_{[E]}^\ast Bun_G(X) \cong H^0(X,\mathfrak{g}\otimes K_X)$?