After performing git push -u origin master, I got:
git push -u origin master
fatal: unable to access \'https://github.com/xxxx/xxxx.git
I had tried all the methods mentioned above, but I was missing something other than what they have mentioned,
try to update your credentials in Control panel -> User Accounts -> Credential Manager for Git it worked for me