While trying to put a new chain on a bike, I rather stupidly removed the "wrong" link in the chain, and it's already very short, so I can't simply remove yet another link in order to get the "correct" combination of links for connecting the chain back together (see the parts in the photo); Is there any way to put the chain pins back in in order to make the chain useable?
It's safer and way easier just to buy another MissingLink (KMC's name for their master link design) of the same type (pin length) the chain came with, leaving you with an inner link that has one on either end. They're around $2US.
In addition to saving the trouble of getting the pin back in there, there's also the question of the integrity of modern outer chain links once they've had a pin pushed back through, even in the more normal circumstance of pushing a link halfway out for chain removal. Every current major manufacturer of derailer chains except KMC says not to do this, due to the risk of the fit not being as tight after re-insertion as it's supposed to be. I've long wondered whether there's actually anything different about KMC in this regard, but I know that modern chains in general are prone to breaking, usually during hard or fumbled front shifts, when they've been reconnected the "traditional" way. I wouldn't venture to guess what the odds are of it happening, probably quite low, but putting in another MissingLink eliminates the risk. They're very trouble-free. Having a couple close together may seem goofy but doesn't cause any issues in practice.
This article titled, How to Get the Pin Back Into a Bike Chain, will give you a step by step guide on how to put the pin back in a bike chain.
Edit: I'm copying the article just in case the link ever becomes broken (no pun intended). The information below is from felixarizona.com
Edit 2: I removed the content that can be found here for possible copyright and rule violations. I recommend going to that article though for pictures of the different steps.
To make your life easier you are going to need a bike chain tool.
First you want to align the holes in the chain in preparation for the pin. Place the pin in the hole in the chain and push with your finger or gently tap with your finger. You don't want to push the pin all the way through until you have the hole on the other side of the link ready. With the chain tool punch the pin the rest of the way through the link. If there is very little force required to push the pin through, you may want to consider a new chain or at the very least a new link.
Then repeat the same process in order to complete the chain. Once you start doing it you will find that it is pretty straight forward.
Again, depending on how old the chain is and whether or not you want to risk it, you may want to just get a new chain.
With older style chains which were designed to be split and joined with a chain tool, the simple fix here would be to use some of the excess chain you cut off of the new chain (they're always too long) and (using a chain tool) splice an extension to the piece you're going to use.
With the newer narrower chains, however, this approach is less reliable.
(Hint here: Read the chain tool instructions! When "breaking" the chain you never push the pin ALL the way out, but stop a turn or two short of that point. If you get it right the pin should just barely project past the inside surface of the plate. If the instructions do not tell you how many turns, use the tool on the last link of the too-long chain and count how many turns it takes to push the pin all the way out. Write that down, minus two turns.)
Today I discovered a fast method of getting a loose pin back into chain without any special tools. Not recommended except last resort!
Stick screwdriver/spanner between the open ends of the outside part of the chain and twist so the holes are pushed out of alignment (and probably bent slightly outwards too). The open ends of the outer part of the link should be offset by about 45°, like scissors.
Place pin inside the inner part of the chain, should be easy because inner part has a wider diameter.
Place the inner part on the outside of one of the open ends, so the inner part of the chain is now acting as a guide to hold the pin in place against the outer part.
Lay it on the ground and smack it with a hammer until the end of the pin goes back into the outer piece. Lift the inner end of the chain off the pin.
Lay the outer end of the chain flat so the pin is now horizontal to the ground. Apply hammer again to the outer piece (the bit without the pin in) until the holes of the outer pieces are back into alignment.
Now use chain tool to screw pin back through all pieces as normal.
All in all it took about 2 minutes to put back together, after my hour of failing with the chain tool. However clearly this is pretty bad for your chain. Using the hammer will probably leave some deformations on the outer chain link and the pin fit might not be as tight as before. Maybe as a last resort to get you to a bike shop...
I'd also recommend avoiding cheap chain tools because the one I bought for rock bottom price broke after one use - the pin on the tool bent outwards. Bad tools make a troublesome job even worse. I guess I learned my lesson about pushing the pin too far through now!
Without specialist equipment, the only practical/reliable way to replace a chain pin is to buy a new one designed specifically for that purpose
but at the price of the pin + the need for a chain tool, buying another quick-link (missing link) or even another full chain might be the best option.
Assuming there is leftover chain from shortening it, this is what I would do:
Completely remove the outer link at the end of the chain (i.e., the one with one pin missing due to your mistake). When you do this, practice removing the link without completely pushing out the pin, e.g., push it out little by little (possibly counting turns for future reference), or set a limiter screw if your chain break tool has one.
From the leftover part of the chain, break off a segment consisting of two outer links and two inner links (i.e., outer-inner-outer-inner), such that you don't fully push out the pin of the outer link at the end of the segment. (This time you should succeed, the one in step 1 was for practice. =)
Join the segment to the inner link now at the end of your chain. When pushing the pin protruding from the outer segment back in, make sure you don't push it through all the way. Try to flex the chain at that link - if it feels stiff, push the pin the other way a little bit and try again. Repeat pushing that same pin back and forth in very small increments with the chain break tool, and keep flexing the chain until it is no longer stiff.
(For reference, I use similar-looking KMC chains and I always use the leftover parts to join into a new chain, in my experience the re-joined chain works just the same as the factory-joined ones.)