English Translation
Narrated 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."
This hadith is from Sahih al-Bukhari, the most rigorously authenticated collection in Islamic scholarship. No editorial opinion is added.