I tried to resolve the issue for a couple of days. In My configuration I was on organizational GitHub and the codelibrary I was trying to get was from github.com. So I thought that might be causing the issue. But that was not true.
I suspected that there is somethisng wrong with the git configuration. as even Organizational github account was not accessible. I tried a lot of solutions from multiple threads.. nothing worked.
Then I ultimately uninstalled GitHub and tortoise git from My machine and installed it again. and did the complete git configuration setup on my machine from scratch.
What caused that issue in first place was identified when I went to uninstall git. Instalation date was the date when the issue started. So i suspect that there was some faulty update installed for git unknowingly and that caused this issue.