It is best to have as much light as possible when mountain biking in the dark. Mostly this means to have at least two reasonably powerful lamps, one in the handlebar and another in your helmet. The one in the handlebar should point pretty close to give you peripheral visibility in front of you while spotting the route ahead.
I wanted to have some easy mounting solution for my helmets and GoPro mount was an easy choice as I already had some mounts on my helmets. I started working with an J-buckle as it already has holes in it for easy screw attachments.
I then took a small piece of 20mm electrical tubing and attached it to the mount. First try revealed that there was a small clearance issue between the rubber band on the lamp and GoPro mount.