A method for producing an endoscope with a distal end and a proximal end, wherein a tube is provided, which has an opening for receiving a window. The method including, inserting a window into the opening of the tube, permanently fixing the window in the opening of the tube, and galvanically applying a noble metal to the tube in the area of the window and around the window. Also provided is an endoscope with a distal end and a proximal end, wherein the endoscope includes a tube, which extends up to the distal end, wherein a window is inserted into the tube on the distal end, which is permanently fixed in the tube by means of a hermetically sealing material. Wherein the tube on the distal end and the hermetically sealing material are coated on the outside with a noble metal.