What adhesive should I use for Carbon Fiber and Painted metal?
I would recommend two-part epoxy resin, and the addition of a pin. Basically you would:


pre-drill a hole through the tube and the cap
mix the resin 
apply resin to both the inside of the tube and the cap
join the two pieces with a nut and bolt


EDIT
Looking at your pic again, I see that there is a place for a screw to lock in the cap. Maybe take it to a hardware store and figure out if it’s an M4 or M6 and use the screw instead of drilling again...