Abdullah bin Abbas reported,

The Prophet ﷺ said, "A woman must not travel except with a male relative whom she cannot marry, and no man may visit her unless such a relative is present with her."A man said, "Messenger of Allah, I intend to set out with such-and-such an army, and my wife wishes to perform the pilgrimage."He replied, "Go with her."

Bukhari 1862

Sahih

حدثنا أبو النعمان حدثنا حماد بن زيد عن عمرو عن أبي معبد مولى ابن عباس

عن ابن عباس رضي الله عنهما قال

قال النبي ﷺ لا تسافر المرأة إلا مع ذي محرم ولا يدخل عليها رجل إلا ومعها محرم فقال رجل يا رسول الله إني أريد أن أخرج في جيش كذا وكذا وامرأتي تريد الحج فقال اخرج معها

البخاري 1862صحيح
Contents
Reference
Commentary
Ayat
Collection
Sahih Bukhari
Book
Game animal penalties
Chapter
Hajj of women
Numbering
Darussalam 1862
Bukhari 1862