Al-Hasan (may Allah have mercy on him) said that Ali (may Allah be pleased with him) was asked about a man who had sworn to perform Hajj on foot, and he said: He should walk, and if he becomes unable, he should ride and sacrifice a camel.
Hadith Referenceالسنن الكبرى للبيهقي / كتاب النذور / 20127