Covariant and consistent anomalies in even-dimensional chiral gauge theories