During the Second World War, Norman Pitkin, a council road mender, plans an excavation outside an army training camp, under the supervision of his superior, Mr. Grimsdale, the Borough Engineer. Pitkin causes an obstruction outside the camp, resulting in an irate Sergeant throwing his 'stop' sign over a hedge.
The next day, Pitkin digs up the road outside the camp. Hiding in his hole, he interferes with army training, shouting commands at soldiers on the parade ground. He is taken for questioning in the camp, where he meets and is entranced by Junior Commander Cartland, an officer stationed at the camp, but shortly to begin a secret mission in Nazi occupied France. Pitkin is jailed, but digs his way out. Disguised as a woman, he escapes from the camp.
Preparing for her mission, Cartland meets Henri Le Blanc, a resistance leader from France. She is told that she will meet him in three weeks' time in Fleury, the French town that serves as headquarters to the German General, Otto Schreiber.
Irritated by Pitkin and Grimsdale, the commanding officer of the army camp arranges to have them conscripted. As they undertake basic training, Pitkin falls in love with Cartland, though she barely notices him. She leaves the camp to begin her secret mission.
Pitkin and Grimsdale are posted to France. They become separated from their unit before they leave England and end up in an aeroplane with some paratroopers. They are forced to parachute over France.
In France, Pitkin and Grimsdale carry out road repairs. Grimsdale is arrested by a German soldier while Pitkin wanders into Fleury to buy supplies. Bearing a striking resemblance to Schreiber, Pitkin is mistaken for the German General. Entering a bar, Pitkin once more meets Cartland, who is posing as a French waitress. He recognises her, but she claims not to know him.
Jean-Claude, a member of the resistance, is convinced that Pitkin is Schreiber. He captures him and takes him to Cartland and Le Blanc in a back room of the bar. When Jean-Claude realises that it is not the General, he and the other resistance members are forced to take Pitkin into their confidence.
Meanwhile, Grimsdale is interrogated by Schreiber, who believes that Grimsdale is Le Blanc. Jean-Claude and Cartland are taken prisoner by German soldiers. Posing as French road menders, Pitkin and Le Blanc dig their way into the grounds of Schreiber's chateau, to attempt to rescue their friends.
Entering the chateau, Le Blanc is captured. Shortly afterwards, Pitkin sneaks into the building. He peers through a keyhole as Schreiber flirts and sings with his guest, Gretchen. Realising his similarity to Schreiber, Pitkin disguises himself as the General. He manages to capture Gretchen and the General. Posing as Schreiber, Pitkin has his comrades released.
Dressed as soldiers, Pitkin's friends escape from the chateau, but his deception is discovered and he is captured. At dawn, he is led before a firing squad. Just before he is to be shot, Pitkin falls into the open mouth of the tunnel he used to enter the chateau grounds. Managing to bring down the tunnel behind him, he escapes.
Back in England, Pitkin is given an Illuminated Address and is appointed Mayor of the Council.