About the Galileo-Urban VIII relationship, this is from the Italian Wikipedia entry on Urban VIII:
Maffeo Barberini, when he was a cardinal, had taken Galilei's defense when the disputes on the various hypotheses of floating phenomena began in Florence . Therefore, when he was elected pope (in 1623), Galileo was led to hope in a benevolent attitude of the new pontiff towards him and his studies.
At the end of 1623 Galilei published a volume entitled Il Saggiatore , with a dedication to the new Pontiff. In this work the scientist, dealing with the motion of comets and other celestial bodies, indirectly confirmed the validity of the Copernican theory. He also argued that knowledge always progresses, without ever settling on dogmatic positions. In other words, man has the right and duty to broaden his knowledge without ever having the claim to arrive at absolute truth. This position, according to the scientist, was in no way contrary to the Faith.
Galilei's work was positively evaluated by Urban VIII. The Pope officially received the scientist in Rome in April 1624 and encouraged him to resume his studies on the comparison between the two systems, provided that the comparison was made only on a mathematical basis. This was to be understood in the sense that a mathematical certainty, that is abstract, had nothing to do with the certainties of the real world. Even with this limitation, the Church of Rome seemed to have softened its position on the new theory.
On 21 February 1632, fresh off the press, the scientific and non-scientific community had in their hands the last work of Galilei, Dialogue on the two greatest systems of the world (the Ptolemaic and the Copernican one), in which the validity of the heliocentric system was definitively upheld.
The hostile reactions were not long in coming. In the summer of the same year, Urban VIII expressed all his resentment because one of his theses had been treated, according to him, clumsily and exposed to ridicule. Furthermore, in the text, there was more than one reference to the pontiff as defender of the most backward positions. Finally the work ended with the affirmation that it was possible to dissertate on the constitution of the world, as long as we never seek the truth. This conclusion [...] infuriated the Pontiff.