Close, but no cigar
Meaning
Fall just short of a successful outcome and get nothing for your efforts.
Origin
The phrase, and its variant 'nice try, but no cigar', are of US origin and date from the mid-20th century. Fairground stalls gave out cigars as prizes, and this is the most likely source, although there's no definitive evidence to prove that.
It is first recorded in print in Sayre and Twist's publishing of the script of the 1935 film version of Annie Oakley:
"Close, Colonel, but no cigar!"
It appears in U. S. newspapers widely from around 1949 onwards; for example, a story fromThe Lima News, Lima, Ohio, November 1949, where The Lima House Cigar and Sporting Goods Store narrowly avoided being burned down in a fire, was titled 'Close But No Cigar'.
Source: phrases.org.uk
Other Links:
Break a leg
Brownie points