E. Cobham Brewer 18101897. Dictionary of Phrase and Fable. 1898.
A man does not get his hands out of the tar by becoming second mate. A second mate is expected to put his hands into the tar bucket for tarring the rigging, like the men below him. The first mate is exempt from this dirty work. The rigging is tarred by the hands, and not by brushes.