Abdullah bin Abbas reported,

He heard the Prophet ﷺ say, "No man should be alone with a woman, and no woman should travel except in the company of a Muharram."A man stood up and said, "Messenger of Allah, I have enrolled in such-and-such military expedition, and my wife has set out for Hajj."He replied, "Go and perform Hajj with your wife."

Bukhari 3006

Sahih

حدثنا قتيبة بن سعيد حدثنا سفيان عن عمرو عن أبي معبد

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

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

البخاري 3006صحيح
Contents
Reference
Commentary
Ayat
Collection
Sahih Bukhari
Book
Jihad and expeditions
Chapter
One who enlisted in an army but his wife set out for Hajj and he had an excuse, is he granted permission
Numbering
Darussalam 3006
Bukhari 3006