Let $k = \mathbb{C}$ be the field of complex numbers. Let $({\rm Art}_k)$ be the category of all Artin local $k$-algebra with residue field $A/\mathfrak{m} \cong k$. Let $E_H$ be a holomorphic (or equivalently, algebraic) principal $H$-bundle over $X$. For given any $A \in ({\rm Art}_k)$, the surjective ring homomorphism $A \longrightarrow A/\mathfrak{m} \cong k$ induces a closed embedding $i : X \hookrightarrow X_A := X\times {\rm Spec}(A)$.
Consider the contravariant functor (called deformation functor)
$$\mathcal{D}_{E_H} : ({\rm Art}_k)^{\rm op} \longrightarrow ({\rm Set})$$
defined by setting $\mathcal{D}_{E_H}(A)$ to be the set of all equivalence classes $[F, \theta]$, where $F$ is a holomorphic principal $H$-bundle on $X_A = X\times_k{\rm Spec}(A)$ together with an isomorphism of principal $H$-bundles $\theta : i^*F \longrightarrow E_H$ over $X$. Two such pairs $(F,\theta)$ and $(F',\theta')$ are said to be equivalent if there is an isomorphism of principal $H$-bundles
$\eta : F \longrightarrow F'$ over $X_A$ such that $\theta = \theta'\circ i^*(\eta)$.
Take $A = k[\epsilon]$, with $\epsilon^2 = 0$, i.e., $A = k[t]/(t^2)$.
Let $(F,\theta) \in \mathcal{D}_{E_H}(k[\epsilon])$.
Take any open subscheme $U$ of $X$. Then $U(\epsilon) := U\times_k {\rm Spec}(k[\epsilon])$ is an open subscheme of $X(\epsilon) := X\times_k{\rm Spec}(k[\epsilon])$. Then take an affine open cover $\{V_i := U_i(\epsilon)\}_{i \in I}$ of $X(\epsilon)$, and fix trivializations $F\vert_{V_i} \stackrel{f_i}{\longrightarrow} V_i\times H$. Then the transition functions for $F$ are of the form $g_{ij}+\epsilon\cdot h_{ij}$, where $g_{ij} : U_i\cap U_j \longrightarrow H$ are transition functions for $E_H = i^*F$, and $h_{ij} \in \Gamma(U_i\cap U_j, {\rm ad}(E_H))$ are sections of the adjoint vector bundle ${\rm ad}(E_H)$. Recall that, ${\rm Ad}(E_H) = E_H\times^H H$ is a group scheme of all principal $H$--bundle automorphisms of $E_H$ over $X$, with Lie algebra ${\rm ad}(E_H)$. The $H$--bundle automorphisms of $F$, which restricts to identity over the closed points $X \hookrightarrow X(\epsilon)$, is the adjoint vector bundle ${\rm ad}(E_H)$. Therefore, a section $s$ of ${\rm ad}(E_H)$ corresponds to the automorphism $1 + \epsilon s$ of $F$. Also if $s_1, s_2$ are two sections of ${\rm ad}(E_H)$, then $s_1 + s_2$ corresponds to the composite automorphism $(1+\epsilon s_1)(1+\epsilon s_2) = 1+\epsilon(s_1+s_2)$, since $\epsilon^2 = 0$. Now one can see that, these $h_{ij}$ defines a $1$--cocycle for ${\rm ad}(E_H)$, and hence defines an element of $H^1(X, {\rm ad}(E_H))$. The converse is also similar. Therefore, we have a canonical bijection $\mathcal{D}_{E_H}(k[\epsilon]) \cong H^1(X, {\rm ad}(E_H))$. Therefore, the space of all infinitesimal deformations of the principal $H$--bundle $E_H$ over $X$ is parametrized by $H^1(X, {\rm ad}(E_H))$.
Reference: I. Biswas and S. Ramanan, An Infinitesimal Study of the Moduli of Hitchin Pairs, doi: https://doi.org/10.1112/jlms/49.2.219.