Gen. David Petraeus pleaded guilty to federal charges Tuesday to end a probe into whether he provided classified information to his mistress when he was CIA director, according to a U.S. official briefed on the matter.