I have had luck with super glue in the past, or like FM says the dime works great too but since super glue dries clear you can still retain the use of the sight lens
The front brake master cylinder on my 1984 GL1200 was leaking brake fluid through the sight glass and I need a fix. I knew what ever type of sealant I used brake fluid would brake it down. So I decided to experiment with super glue. I first applied a spot of super glue on a piece of sheet metal and let it dry over night. Then I put some brake fluid on top of it and let sit for a couple of hours. It didn't brake it down!I then lowered the level of fluid in the MC then with the cap on and sealed I loosen the bolts that hold it on the handle bars and laid it on its' side with the sight glass up. I let it dry out overnight and then took a hair dryer to it. I cleaned it with a brass brush around the edges. I then applied the super glue and spread it out added a little more so all was even the the case. It took about 4 hours for it to dry then I reapplied. Let that dry completely then sealed it with clear coat. The patch has be in place for about 10 hours with no leak. It worked for me, super glue, package of 4 at walmart ,$1.49 go figure.
BTW: super glue drys clear so I was able to still use the sight glass.