With a chain riveter! They've been standard workshop tools ever since chains stopped having split links. Often sold as a kit with a chain splitter, they're simple bits of kit that deform the rivet head. Clamps around chain & tightened with a spanner. Come with a choice of warheads to suit different size rivets. Clearance space can be an issue on some bikes but I've never been defeated yet.