Suppose that $X$ is a connected smooth manifold and $\Gamma$ is a group acting smoothly, freely, properly and discretely on $X$, so that $Y=X/\Gamma$ is another smooth manifold endowed with a covering map $\pi:X\rightarrow Y$.


Suppose that $G$ is a Lie group and that $\rho:\Gamma \rightarrow G$ is a group homomorphism. Then we can consider the quotient $E\_\rho =(X\times G)/\Gamma$, where the action of $\Gamma$ on $G$ is given by composing $\rho$ with the adjoint action of $G$ on itself. $E\_\rho$ is naturally a principal $G$-bundle over $Y$.


My question is if there exists a condition for a principal $G$-bundle $E$ on $Y$ to be isomorphic to an $E\_\rho$, for some homomorphism $\rho:\Gamma \rightarrow G$.


This can be interpreted as a "relative" notion of a flat connection since, if $X$ is the universal covering space of $Y$ and $\Gamma=\pi\_1(Y)$, then the condition for $E$ to be of the form $E\_\rho$ is that $E$ admits a flat connection.


Moreover, the same question can be extended to the holomorphic category. For example, we can take $X$ a Riemann surface and $G=U(n)$. In that situation, if $X$ is the hyperbolic plane and $Y$ is a compact Riemann surface of genus $\geq 2$, the condition for a holomorphic Hermitian vector bundle $E$ to be of the form $E\_\rho$ is that it is stable of degree $0$ (this is the Theorem of Narasimhan-Seshadri).



The notion of a "relatively" flat connection
Your bundle is of the form $E\_\rho$ if and only if it admits a flat connection whose holonomy $\rho:\pi\_1(Y) \to G$ is trivial in restriction to $\pi\_1(X)$.


Even without this additional assumption, I don't know a general answer to when a principal bundle admits a flat connection. There are necessary conditions (namely, the vanishing of some characteristic classes) but they are not sufficient in general.


For instance, the Milnor--Wood inequality states that principal $\mathrm{SL}(2,\mathbb R)$ bundles over a Riemann surface of genus $g$ admit a flat connection if and only if their reduction of structure group to $\mathrm{SO}(2)$ has Euler class between $1-g$ and $g-1$.


Also be careful that the stability condition for holomorphic vector bundle is not a condition for a holomorphic Hermitian vector bundle to be flat, it is a condition for a holomorphic vector bundle to admit a Hermitian metric whose Chern connection is flat.


