Sahih al-Bukhari 7244
صحيح البخاري#7244Sahihحَدَّثَنَا أَبُو الْيَمَانِ، أَخْبَرَنَا شُعَيْبٌ، حَدَّثَنَا أَبُو الزِّنَادِ، عَنِ الأَعْرَجِ، عَنْ أَبِي هُرَيْرَةَ، قَالَ قَالَ رَسُولُ اللَّهِ صلى الله عليه وسلم " لَوْلاَ الْهِجْرَةُ لَكُنْتُ امْرَأً مِنَ الأَنْصَارِ، وَلَوْ سَلَكَ النَّاسُ وَادِيًا وَسَلَكَتِ الأَنْصَارُ وَادِيًا ـ أَوْ شِعْبًا ـ لَسَلَكْتُ وَادِيَ الأَنْصَارِ أَوْ شِعْبَ الأَنْصَارِ ".
Narrated Abu Huraira:Allah's Messenger (ﷺ) said, "But for the emigration, I would have been one of the Ansar: and if the people took their way in a valley (or a mountain pass), I would take the Ansar's valley or the mountain pass
Scholarly Authentication
The label above is the grade most of these scholars gave — one dissenting opinion no longer speaks for all of them. If any scholar calls a narration fabricated, that verdict is shown instead, whatever the others say. Each scholar's own wording:
Every narration in Sahih al-Bukhari is accepted as Sahih (authentic) by the established status of the book.
In-book reference: 94:19