So, I have a repo setup, on another machine. I\'ve committed and pushed files and they view fine on github.com. Now, I have ran git init
on another machine and
You need to check what credential (username/password) you are using on the machine where a push to GitHub succeed, and re-use those credential in your new local repo.
Check especially the type of url used: ssh (git@github.com:me/someproj.git
) or https (https://github.com/me/someproj.git
).
Check also if you were using 2FA (Two-Factor Authentication) or not for that GitHub account and repos.
You can embed the right username in your url::
cd /path/to/new/local/repo
git remote add origin https://me@github.com/me/someproj.git