The electrical properties of single-molecule junctions, consisting of an organic molecule coupled to metal electrodes, are sensitive to the detailed atomic structure of the molecule-metal contact. This, in turn, is determined by the anchoring group linking the molecule to the metal. With the aim of identifying and comparing the intrinsic properties of two commonly used anchoring groups, namely thiol and amine groups, we have calculated the atomic structure and conductance traces of different Au-S-Au and Au-NH2-Au nanojunctions using density functional theory (DFT). Whereas NH2 shows a strong structural selectivity towards atop-gold configurations, S shows large variability in its bonding geometries. As a result, the conductance of the Au-NH2-Au junction is less sensitive to the structure of the gold contacts than the Au-S-Au junction. These findings support recent experiments which show that amine-bonded molecules exhibit more well-defined conductance properties than do thiol-bonded molecules.