You need to check which credentials (username / password) you use on the machine where you succeed on GitHub, and reuse these credentials in your new local repo.
, , URL: ssh (git@github.com:me/someproj.git) https (https://github.com/me/someproj.git).
, 2FA ( ) GitHub.
URL-:
cd /path/to/new/local/repo
git remote add origin https: