Sahih Muslim Book 14, Hadith Number 4032.

Chapter : He who took the vow that he would go on foot to the Ka’ba.

‘Uqba b. Amir reported: My sister took a vow that she would walk bare foot to the house of Allah (Ka’ba). She asked me to inquire from Allah’s Messenger (may peace be upon him) about it. I sought his decision and he said: She should walk on foot and ride also.