Former military lawyer David McBride has been sentenced to five years and eight months for sharing classified documents with journalists.