I know that this is an old thread, but I came across this while doing research and I know other people will, so I thought I'd write in and provide clearer answers (no offense to previous posters, but your answers aren't very well researched).
Steve Roger's identity had been kept a secret since his inception circa Captain America Comics #1. When not on a mission as Cap, he distanced his civilian identity from his alter ego by acting like a bumbling accident-prone private in the military. It was a similar dynamic to Superman when he was Clark Kent back in the day.
People who knew during the war were Bucky, and top military brass such as General Chester Phillips. Nazi spy Cynthia Glass also knew (Adventures of Captain America #1), as did President Franklin Roosevelt (Captain America #255). The core members of the Invaders (Sub-Mariner, Human Torch, and Toro) also found out at some point, but there aren't any specific issues where Steve implicitly reveals his identity to them.
In the 1950s, William Burnside (who became the 1950s Captain America) figured out Steve Rogers’ true identity. He shared this with Jack Monroe who was his Bucky. This was detailed in Captain America #155.
After he was revived in Avengers #4, the Avengers present discovered his identity (Thor, Iron Man, Giant-Man, and the Wasp).
In Cap's solo exploits (which started up again in Tales of Suspense #59) Cap began interacting with Agent 13 (in issue #75 of that series). He fell in love with her and at one point publicly retired in Tales of Suspense #95 so that he could be with Agent 13. That didn't pan out and when Cap got his own solo series, he was a target of Hydra who was attacking him both in and out of costume, so he faked his death (Captain America #111-114). This involved leaving behind a life-like mask making everyone believe Steve Rogers was a false identity. If that sounds kind of flimsy to you, they revisited that moment in Avengers #71 and explained that the Space Phantom used some advanced technology to wipe out everyone's memory of Cap's true identity.
Over the years, they kind of played it fast and loose as to which of the Avengers knew Cap's true identity. SHIELD (Nick Fury and Sharon Carter specifically) always seemed to know. Although there was never any huge "reveal" story, the first two teams of Avengers (Thor, Iron Man, Wasp, Hank Pym, Hawkeye, Scarlet Witch, and Quicksilver) all learned his identity early on and he kept them in the know. The same could be said about the more trustworthy Avengers, like the Vision. The roster from the 90s seemed to be in the know as well (Black Knight, Sersi, Crystal, Hercules, and the like) but there are no specific issues where he is shown implicitly revealing his identity to them. The Falcon has always been in the know since pretty much his first appearance in Captain America #118.
He told his old childhood friend Arnie Roth (Captain America #270), his girlfriend Bernie figured it out on her own (Captain America #275), the Red Skull learned when he transferred his mind into a clone of Steve Rogers body (Captain America #350), and he revealed his identity to Diamondback when they started dating (Captain America #371). His relationship with Connie Ferrari ended when she learned the truth in Captain America (vol. 3) #44.
This is by no means an exhaustive list, but that's more or less everyone of note.
Cap finally re-revealed his identity to the public in Captain America (vol. 4) #3, because he had just killed a Middle Eastern terrorist named Faysal Al-Tariq. He unmasked to take ownership of the death and to hopefully deter other terrorists from striking at America in retaliation. He figured that if they knew who he was under the mask they'd target him directly. He has maintained a public identity ever since, time of this writing.
That said, a lot of people are also incorrect about what Captain America represents and why his identity was kept secret.
His identity was kept secret because it was a military secret — especially after the creator of the Super Soldier Serum was murdered by a Nazi assassin. Other than high-ranking military officials, only those with a need to know had access to the truth. Per Captain America Annual 2001 even sitting Presidents after Roosevelt did not know his true identity. That information was sealed in a file that could only be opened in the event that Captain America was confirmed to be dead.
When SHIELD was created, the director of the agency was also allowed to know the truth. But Nick Fury might have also found out the truth during the war, they are never clear on that.
His need to keep his identity a secret wasn't because of any of this "he represents the American people" non-sense other posters are saying. Once he was no longer working directly for the government and/or military it became a matter of protecting those he knew in his personal life. Same as anyone else.
Also, the assertion that Captain America represents the American people is incorrect. Yes, Captain America became disillusioned between Captain America #175-183. That taught him that he can't always support the government of the day, as governments (like people) are fallible. They can do things wrong. They can be led astray.
Captain America represents the American Dream. Something that transcends the government of the day and the sensibilities of the general public. He represents life, liberty, freedom, the pursuit of happiness, and that all people are created equal. That's what he represents and that's what he fights for.