Assume that $E$ is a bundle of Lie Algebras. Let $g$ isbe an invariant metric on $E$ i.e, that is for all $p\in M$, $$g_p([x,y],z)+g_p(y,[x,z])=0,$$ where $x,y,z\in E_p$ are arbitrary.
Is there a Riemannian connection $\nabla$ on $E$ like $\nabla$ such such that: $$\nabla_U[X,Y]=[\nabla_U X,Y]+[X,\nabla_U Y]$$ holds for every $U\in \mathcal{X}(M)$ and $X,Y\in\Gamma E?$