"A well regulated Militia, being necessary for the security of a free State, the right of the people to keep and bear Arms, shall not be infringed."

No typos, it's a matter of the definition of arms. The arms mentioned here are not weapons, but what we more commonly call coats of arms.

The connection with a well regulated militia is that for a well regulated militia you have to know who you have to pick from. The practice of the King's handing out arms to a select few was being rejected in this amendment by the declaration that everyone had the right to bear arms. Congress had a bill establishing a National Registry of Armigers to keep track of everybody but it died in committee.