General Stanley McChrystal, who was sacked last year as the United States and North Atlantic Treaty Organisation commander in Afghanistan after publication of an article that quoted him as criticising the Obama administration, has been cleared of wrongdoing by the Pentagon.