According to this video by History Matters, Pope Pius IX threatened to excommunicate whoever ordered the assault on Rome, but the Italians got around this by having a Jewish soldier do it instead. I could not find any sources about it when I searched up on this. Did this really happen? What was the name of that Jewish soldier the Italians asked to lead the Assault on Rome in 1870 so that no members of the Italian army would be excommunicated by Pius IX? Are there any other sources that can verify this?
Correction: The Capture of Rome actually took place in 1870 September 20, not 1871.
The Italian takeover of Rome took place under the command of mj. general Raffaele Cadorna, who is usually listed as catholic. His religious beliefs wouldn't matter much since the Pope - who had already taken similar steps for other political figures involved in the Italian Risorgimento (most notably Cavour, whose last rites were an extremely controversial affair at the time) - obviously intended his excommunication to fall on those responsible for what he denounced as an hostile occupation and flagrant violation of his prerogatives, both religious and political.
As he explicitly stated in his Resipicientes ea omnia (November 1^st 1870), the "major excommunication" was directed at all those, whether in position of power or not, who "carried off the invasion, usurpation and occupation" as well as at "their principals, supporters, conspirators, advisors, followers, or whomever else facilitated [...] or acted by himself such scelerous deeds".
Quoniam vero Nostra monita, expostulationes et protestationes in irritum cesserunt, idcirco auctoritate omnipotentis Dei [...] declaramus, eos omnes, qualibet dignitate etiam specialissima mentione digna, fulgentes, qui quarumcumque provinciarum Nostrae ditionis atque almae huius Urbis invasionem, usurpationem, occupationem vel eorum aliqua perpetrarunt, itemque ipsorum mandantes, fautores, adiutores, consiliarios, adhaerentes vel alios quoscumque praedictarum rerum exequutionem quolibet praetextu et quovis modo procurantes vel per seipsos exequentes, maiorem excommunicationem aliasque censuras et poenas ecclesiasticas a sacris Canonibus, Apostolicis Constitutionibus et generalium Conciliorum, Tridentini praesertim (sess. 22, c. 11 de Reform.) decretis inflictas incurrisse iuxta formam et tenorem expressum in superius commemoratis Apostolicis litteris Nostris die 26 Mart. an. 1860 datis.
The relative vagueness, and broadness, of the terminology did at least prevent a direct, and explicit, excommunication of the King; and Victor Emmanuel II managed to maintain relations, albeit not exactly cordial, with the Pope, until he was, discreetely, allowed to take his last rites. But the tension between the Vatican and the Italian political establishment was very real (albeit not as "mechanical" as certain interpretations appear to suggest) and, for some, deeply concerning on a moral and religious level (the somewhat infamous Lugi Cadorna, Raffaele's son, was profoundly devout, in part due to his feeling that he had to atone for the excommunication inflicted upon his father, to the point where he is often characterized, not entirely without reason, as a bigot). It's worth keeping in mind that, at least until the mid XIX Century, the Savoy Kings had enjoyed a reputation of devotion - Charles Emmanuel IV even joined the Jesuits after his abdication, and even the "Italian" Charles Albert was well known for his extensive religious fasting - so that this rift with the Church was not exactly a secondary issue, and ended up playing a significant role in conflicting political trends which envisioned the Italian state either as strictly laical or as a inherently confessional.
The death of Victor Emmanuel II himself - while he was allowed to die a christian - did not result in a quelling of tensions that reached beyond the exact matter of Rome and the Pope's temporal domains. The main voice of the catholic press in the Capital announced his demise by mocking his proclamation from his first visit as King of Italy - that he was indeed "there to stay as a rotting corpse" - a mortal man in the immortal city.
For an overview of the relations between Italian liberal institutions and the Catholic Church, albeit both quite dated, Candeloro's Il movimento cattolico in Italia and De Rosa's Storia del movimento cattolico provide a good introduction to these topics.
This refers to an anecdote that the first order to fire was given by a young Jewish artillery captain, Giacomo Segre, to avoid the threat of excommunication.
However the documentary evidence seems to suggest that the 9th, 13th, 11th and 12th artillery divisions had already began the bombardment from 5:15 on 20 September 1870, ahead of the bombardment of Segre's 5th at 5:20.
So in short, there was a Jewish artillery captain present, who ordered his 5th division to fire, but he wasn't the first (by 5 minutes), and his involvement wasn't specifically to avoid the threat of excommunication.
He was just a Jewish artillery captain who happened to be involved, and a legend grew up around him.
https://www.ilgiornale.it/news/cultura/porta-pia-vera-storia-cos-fu-presa-roma-1891151.html