I am going to share how did it help me. I also have spent two days just to find it was a small issue.
I have updated the profile name to the user name which was showing under git config ls (only username before @).
code pushed successfully.