Hi Peter,
A good and secure way to rivet it is to use a flat head machine screw and drill and tap the muzzle cap for the screw. Countersink the head into the bottom of barrel channel. Then install the cap and screw it into place until you are sure everything is as you want it before attaching the cap permanently. Then when you are ready to permanently install the cap, countersink the screw hole on the outside of the cap, install the cap and screw, and peen the end of the screw into the countersink forming a rivet. File the excess flush.
dave