The Mali government and the three main rebel groups operating in the northern desert signed a ceasefire deal Friday, the United Nations announced.