If the rivet has clean straight ends, push it into the thinner part of chain.
Then get a large flat blade screwdriver.
open out the wider part of chain by twisting the blade in between the link plates
Then push it together.
then let the screwdriver out.
the link will grab the rivet.
then tap with a hammer
or carefully use a chain tool
better doing this on the desk...not while under pressure from the rear mech