Sahih al-Bukhari 4615
صحيح البخاري#4615SahihNarrated `Abdullah:We used to participate in the holy wars carried on by the Prophet (ﷺ) and we had no women (wives) with us. So we said (to the Prophet (ﷺ) ). "Shall we castrate ourselves?" But the Prophet (ﷺ) forbade us to do that and thenceforth he allowed us to marry a woman (temporarily) by giving her even a garment, and then he recited: "O you who believe! Do not make unlawful the good things which Allah has made lawful for you
Scholarly Authentication
We show the most cautious grade (weakest-wins) as the overall label. Individual scholars graded it as follows:
Every narration in Sahih al-Bukhari is accepted as Sahih (authentic) by the established status of the book.
In-book reference: 65:137