This German folktale tells the story of a poor peasant who is visited by the devil. The devil offers the peasant a deal: if the peasant can guess his name, he will be granted three wishes. The peasant agrees and sets off on a journey to discover the devil's true identity.
From Wikipedia
"The Peasant and the Devil" is a German fairy tale collected by the Brothers Grimm, tale number 189. It is Aarne-Thompson type 1030, man and ogre share the harvest.