Heating copper wire and sulfur powder
By burying the copper wire with plenty of sulfur and then heating the mix, the wire becomes completely submerged in liquid sulfur. The liquid sulfur then gets to react with the copper, and any oxygen that could possibly oxidize the copper would have to diffuse into the liquid sulfur before reaching the copper. However, oxygen quickly reacts with heated sulfur forming sulfur oxides, so it never reaches the copper wire. This is all under ideal conditions, of course.

(Originally given as a comment by @Nicolau Saker Neto)