Problem connect to github when using two factor authentication


I have this issue. I’m using two factor authentication.
When I use Source Tree I don’t have a problem to take and submit a code, but when I want to make squash commit I can’t do it through source tree I’m using console. The problem is that I’ve cloned the repository https not ssh. When start the console and I want to fetch or pull it wants my user and pass. They are correct but I can’t login because I think that two factor authentication hinder it.
How can resolve this ?