Let $\pi:P\to M$ be a principal $G$-bundle on a manifold $M$ endowed with a connexion $A$. Let $X$ be a tangent vector field on $M$ and let $Y$ be a (not-necessarily horizontal) lift of $X$ to $P$. In other words, for every $p\in P$ we have $$\pi_{*,p}(Y_p)=X_{\pi(p)}\ . $$ The vector field $X$ defines a one-parameter group $(\alpha_t)$ of local diffeomorphisms of $M$ , and $Y$ defines a one-parameter group $(\beta_t)$ of local diffeomorphisms of $P$.
Let $U$ be an open subset of $M$ such that $\alpha_t$ is defined on $U$ and let
$$\alpha_t :U\to V$$
the corresponding diffeomorphism. Then $\beta_t$ will be defined over $\pi^{-1}(U)$ so we obtain a lift
$$\beta_t:\pi^{-1}(U)\to \pi^{-1}(V)$$
of $\alpha_t$.
What is the condition which should satisfy the lift $Y$ of $X$ such that every diffeomorphism
$$\beta_t:p^{-1}(U)\to p^{-1}(V)$$
of this type leaves the connection $A$ invariant (more precisely it maps the restriction of $A$ to $\pi^{-1}(U)$ on the restriction of $A$ on $\pi^{-1}(V)$).