I ride a mountain bike for part of my commute to work. I have a rear rack and use a homemade pannier bag to sluff my belongings. That puts weight on the rear tire which is why so I wanted to move the U lock forward.
I found what has been a very easy-to-use and secure way to mount the lock on my handlebars for about $1.00 using slightly modified PVC pipe Tees and cable ties. I've been using this setup for 2 weeks now and I love it.
Step 1: Parts You'll Need:
The Tees I used are 1/2" by 1/2" meaning all three openings are 1/2". This fit my handlebars and lock nicely.
If you wanted to mount to a spot which is larger or smaller than the opening needed for your U lock, they sell Tees with different sized openings. Ex. 1/2" x 3/4", 1/2" x 1/4" etc. The key is fitting the lock and the bar that you will be mounting to.
The side fitting of the Tee fits the hard point mounting location. The straight or through-pipe section of the Tee is fitted for the lock.
Step 2: Modify the Tees to Fit Your Mounting Location
I wanted the side leg of the Tee to rest completely and tightly around the handlebars. The bars were slightly larger than 1/2" so the tee didn't really fit tightly. One at a time I used a heat gun (or hair dryer) to heat the cut side leg until soft, then pressed it onto my handlebars. Hold it until it cools and hardens or spray a little water on it to cool. This made a tight custom fit. You can see in the photo that the side leg has been spread a little from its original size.
Step 3: Mount the Brackets With the Cable Ties
Step 4: Finished Product
Note: I am fortunate the way the lock cable wound around the U lock rests on the handlebar stem so it lies horizontal. If you had a similar lock with no cable wound around it I'm sure the crown would slip down around the stem and could possibly interfere with steering. Shorter locks my not have this problem. A short bungee cord would probably secure the crown from slipping down around your stem if you like this mounting option.
You can see in the side pic that if the cable wasn't there, the lock would rotate downward around the stem. With the cable ties there really isn't anything to keep the brackets and lock from rotating around the handlebars. Some rubber inner tube between the bars and brackets would help, but with the weight of the lock I don't know if it would be enough. You could probably drill & screw into the bars, but I didn't want to do that.
Safety has to come before ease of use. Play around with different mounting options. Don't ride with a setup that could interfere with steering.
Step 5: Other Mounting Options
I just didn't like threading the crown of the lock through the cables every time.
You could probably use this same setup vertically on the front or rear fork.
I hope this helps. Ride safely, lock your ride securely.