  We exploit the SDSS galaxy groups catalogue of Yang et al. to study how the
gas-phase metallicities of star-forming galaxies depend on environment. We find
that satellite and central galaxies follow a qualitatively similar stellar mass
(M_*) - gas-phase metallicity relation. Satellites, though, have higher
gas-phase metallicities than equally massive centrals, and this difference
increases with decreasing M_*. We also find that the gas-phase metallicity of
satellites increases with halo mass at fixed stellar mass. This increment is
more pronounced for less massive galaxies. We also show that low mass satellite
galaxies have higher gas-phase metallicities than central galaxies of the same
stellar metallicity. This difference becomes negligible for more massive
galaxies of roughly solar metallicity. We demonstrate that the observed
differences in gas-phase metallicity between centrals and satellites at fixed
M_* are not a consequence of stellar mass stripping (advocated by Pasquali et
al. in order to explain similar differences but in stellar metallicity), nor to
the past star formation history of these galaxies as quantified by their
surface mass density or gas mass fraction. Rather, we argue that these trends
probably originate from a combination of three environmental effects: (i)
strangulation, which prevents satellite galaxies from accreting new, low
metallicity gas which would otherwise dilute their ISM, (ii) ram-pressure
stripping of the outer gas disk, thereby inhibiting radial inflows of
low-metallicity gas, and (iii) external pressure provided by the hot gas of the
host halo which prevents metal-enriched outflows from escaping the galaxies.
[abridged]
