Sahih al-Bukhari 4425
Narration text is preserved in its supplied Arabic and English. Translated interfaces and reading guides do not add narration translations in other languages.
لَنْ يُفْلِحَ قَوْمٌ وَلَّوْا أَمْرَهُمُ امْرَأَةً "
Narrated Abu Bakra:
During the days (of the battle) of Al-Jamal, Allah benefited me with a word I had heard from Allah's Apostle after I had been about to join the Companions of Al-Jamal (i.e. the camel) and fight along with them. When Allah's Messenger (ﷺ) was informed that the Persians had crowned the daughter of Khosrau as their ruler, he said, "Such people as ruled by a lady will never be successful."
Full reference and source
Sahih al-Bukhari 4425 In-book : Book 64, Hadith 447 USC-MSA web (English) : Vol. 5, Book 59, Hadith 709 (deprecated)
View source on Sunnah.com (opens in a new tab)