Low-resolution intensity spectra of Earth's atmosphere obtained from space reveal strong signatures of life ('biosignatures'), such as molecular oxygen and methane with abundances far from chemical equilibrium, as well as the presence of a 'red edge' (a sharp increase of albedo for wavelengths longer than 700 nm) caused by surface vegetation. Light passing through the atmosphere is strongly linearly polarized by scattering (from air molecules, aerosols and cloud particles) and by reflection (from oceans and land). Spectropolarimetric observations of local patches of Earth's sky light from the ground contain signatures of oxygen, ozone and water, and are used to characterize the properties of clouds and aerosols. When applied to exoplanets, ground-based spectropolarimetry can better constrain properties of atmospheres and surfaces than can standard intensity spectroscopy. Here we report disk-integrated linear polarization spectra of Earthshine, which is sunlight that has been first reflected by Earth and then reflected back to Earth by the Moon. The observations allow us to determine the fractional contribution of clouds and ocean surface, and are sensitive to visible areas of vegetation as small as 10 per cent. They represent a benchmark for the diagnostics of the atmospheric composition, mean cloud height and surfaces of exoplanets.