I am asking for a proof of Lemma (4.2.8) of Donaldson, Kronheimer: The Geometry of Four-Manifolds.
Let $P \rightarrow X$ be a principal bundle with structure group $G$. Denote by $\mathcal{G}$ the gauge group. Let $A$ be a connection on $P$ and $H_A \subset G$ its holonomy. Denote by $$ \Gamma_A= \{u \in \mathcal{G} | u(A)=A \} $$ the isotropy group of $A$ in $\mathcal{G}$. Then the claim of the lemma is:
For any connection $A$ over a connected base $X$, $\Gamma_A$ is isomorphic to the centraliser of $H_A$ in $G$.
My attempt to prove it: Now if the bundle was trivial, i.e. $P=X \times G$, we could take $g \in G$ in the centraliser of $H_A$ and get a unique element $u_g \in \mathcal{G}$ satisfying $u_g(x,e)=(x,g)$. If the connection $A$ is the trivial connection then it is easy to check that this satisfies $u_g \in \Gamma_A$.
In matrix notation we have $u(A)=u^{-1}Au+u^{-1} du$. Plugging in an $A$-horizontal vector field to this formula shows that any $u \in \Gamma_A$ needs to be constant on $X \times \{e\}$, i.e. $u=u_g$ for some $g \in G$. Plugging in a vertical vector field shows that $g$ must be in the centraliser of $H_A$ in $G$, because $u^{-1} du$ vanishes on vertical vector fields.
I believe I can make this argument work for non-trivial connections $A$. But no matter if I can or cannot: all of this assumed that the bundle was trivial. If the bundle isn't trivial I don't even know how to write down a map from the centraliser of $H_A$ to $\Gamma_A$.
Fix some $x\in X$ (and assume $X$ is connected).
There is an evaluation map $$\operatorname{ev}_x\colon\Gamma_A\to\operatorname{Aut}P_x=G.$$ The crucial property that we will exploit is:
This gives us:
Conversely, given any $g\in C_G(H_A)$, we can define $u\in\mathcal{G}$ by:
It is clear the constructions are inverse of each other, so $\Gamma_A\cong C_G(H_A)$.