The circumstances have not been revealed yet. In "The Name of the Doctor", River says she "made him" tell him, but it took some work. In "Forest of the Dead", the Doctor says there is only one circumstance under which he could tell her his name. In "The Wedding of River Song" it appears that the Doctor tells River his name (suggesting marriage being the circumstance the Doctor referenced) but in reality he tells her to look into his eye (revealing that he is actually the Teselecta body-impersonation vessel). So the actual circumstances have yet to be revealed.