Police praised the man's "heroic actions" as the robbers left empty-handed from the service station in Westhoughton, Bolton.
The member of staff took off a shoe and grabbed a glass jar when he was confronted by his assailants at 1.20am on Saturday.
One of the raiders wielded a knife as the shop worker fought them off, police said.
The victim suffered two puncture wounds to his arm and later needed 12 stitches.
Both offenders were black, with one 6ft of medium build and in his early to mid 20s and the other about 5ft 9in and of medium build.
Police want to trace a woman who walked into the Mercury Service Station seconds before the incident and may have witnessed the whole encounter.
Detective Constable Malcolm Cheetham said: "This man's heroic actions meant that these thieves were able to get away empty handed, but for his trouble he was wounded. We will do all we can to find the men responsible.
"We are appealing for witnesses, but in particular we need to hear from the woman who walked in only moments before but didn't stick around to give the police her account - probably because she was so shaken up. We need to find out everything that she may have heard or seen, including before the robbery. We urge her to get in touch as soon as possible."