The 35-year-old had been without a club since being released from St Mary’s at the end of last season.
However, League One strugglers Pompey have completed a move for him, subject to Football League approval.
“This is an historic club with a great tradition,” said Connolly. “I’m very honoured to become a Portsmouth player.
“I had a couple of offers in August from clubs in the top half of the Championship, but nothing happened for a variety of reasons.
“But I’m delighted to be here now – I consider this a great club and I’m proud to have it on my CV.”