Unplug the fridge so it is not operational while you make the repair. This prevents the risk of an electrical accident.
Clean off the line by wiping it down with a sponge, warm water and a drop of dish soap. This helps remove dirt that interferes with the repair process. Dry the line with a rag once you're done cleaning it.
Place a solder wire with high silver content up against the leak in the line and apply heat from a soldering torch. The torch melts the solder so it covers the leak and the hole is sealed when the melted metal hardens.
Spray a hole filler into any rubber lines that have a hole in them. They act much like tire sealants in cars, in that they expand in the hole and prevent air or gas from seeping out through it.