Sayyiduna Jabir (may Allah be pleased with him) narrated that the Prophet (peace and blessings be upon him) was on a journey and saw a man over whom shade had been made. He (peace and blessings be upon him) asked about him, and they said: He is fasting. So he (peace and blessings be upon him) said: "Fasting on a journey is not righteousness."
Hadith Referenceالسنن الكبرى للبيهقي / كتاب الصيام / 8153