I want to have a deep insigth to my problem i.e. I know that bonds between atoms(of different or same elements)to be formed are based on no. of electrons less in octet or duplet(say O2, each O atom has two electrons less in octet thus forms two bonds).But why bonds between e^- & e^- are formed to complete the octet even though they have same sign so must repel & not form a bond?

2 answers

This is avery good question! This leads us directly into quantum mechanics, a branch of modern physics. It has been proven mathematically (very complex, so I will not bother you with the details!) that electrons can and must be assigned a number, either +1 or -1 denoting the so-called spin. Two electrons with a different spin can form such a bond as they do not repel each other respectively.
I might add that the electrons actually do repel each other since both have the same negative charge; however, the opposite spins give a magnetic moment that attract each other. The opposite spins are enough to overcome the repulsion forces.