  We investigate the existence (or lack thereof) of the chiral magnetic effect
in the framework of finite temperature field theory, studied through the path
integral approach and regularized via the zeta function technique. We show
that, independently of the temperature, gauge invariance implies the absence of
the effect, a fact proved, at zero temperature and in a Hamiltonian approach,
by N. Yamamoto. Indeed, the effect only appears when the manifold is finite in
the direction of the magnetic field and gauge-invariance breaking boundary
conditions are imposed. We present an explicit calculation for antiperiodic and
periodic boundary conditions, which do allow for a CME, since only large gauge
transformations are, then, an invariance of the theory. In both cases, the
associated current does depend on the temperature, a well as on the size of the
sample in the direction of the magnetic field, even for a
temperature-independent chiral chemical potential. In particular, for
antiperiodic boundary conditions, the value of this current only agrees with
the result usually quoted in the literature on the subject in the
zero-temperature limit, while it decreases with the temperature in a
well-determined way.
