1. Use a wire brush and a cleaning product, such as paint thinner, to remove dirt and grease. Sand the pipe lightly. With latex gloves on, wipe the surface with thinner once again. Use tape and newspaper to mask off anything you don't want painted.
2. Buy paint that resists high heat, such as PJ1 high-temp paint. You can find spray cans of it on websites and at auto parts stores. You also can use flat black paint made for barbecue grills--it's available at many hardware stores. Spray on several light coats, letting them dry in between
3. At the end, warm up your bike for about 15 minutes. Let it cool, and warm it up again for about a half-hour. This slow warming process helps the paint cur