Eunice Foote published her experiment with CO2 in 1857, showing how CO2 causes warming.
By 1965, scientists were confident enough to warn president Lyndon B. Johnson.
Exxon knew in 1977, that the CO2 would cause global warming.
See this 23 min. YouTube video.