So, is it okay to lie if anyone asks about previous sins?

No need to lie just you can say it’s my very personal issue and I can’t tell this to even my parent and wife. Then no need to answer yes or no, just say I don’t want to discuss anything on this issue.