One gram per cubic centimetre is exactly one kilogram per litre. The numbers are identical, and which of the two a document uses says more about the field it came from than about the substance it describes.
About the units
The identity holds because a litre is exactly a cubic decimetre, which is a thousand cubic centimetres, and a kilogram is a thousand grams. The choice between the labels is disciplinary. Chemistry and materials science use g/cm³, because samples are small and the cubic centimetre matches the scale of a specimen; the unit also puts water at 1.00, which makes relative density immediate. Process and chemical engineering use kg/l, because tanks and pipelines are measured in litres and the mass being tracked is in kilograms. Petroleum, food and pharmaceutical production all follow the second convention.
The exact factor
The factor is exactly 1. The useful content is knowing which unit to expect from which source, because a document that mixes them without comment is usually a translation or a compilation from two traditions. Typical values in either unit: ethanol 0.789, olive oil 0.915, water 1.000, glycerol 1.261, sulphuric acid 1.84, mercury 13.53. Anything below 1 floats on water and anything above sinks, which is the practical reading the unit choice was designed to make obvious.
Where you meet this conversion
Reading a materials datasheet against a process specification. A polymer supplier gives 1.38 g/cm³ and the moulding plant's documentation says 1.38 kg/l for the same resin — identical figures, different departments. Petroleum products are traded on density in kg/l at a reference temperature, while the laboratory that measured it reports g/cm³. Recognising that no conversion is needed prevents a spurious one being applied.