It was the Pope himself who agreed to the jailing of Galileo.
Galileo was never jailed.
He was put under house arrest after staying with the Tuscan ambassador, and then at the residence of the archbishop of Siena for a few months.
The Pope you’re thinking of is Urban VIII.