Jeśli zrobimy git clone https://github.com/zxc/repo.git, a potem:
git push origin master Username for 'https://github.com': zxc Password for 'https://zxc@github.com': remote: Invalid username or password. fatal: Authentication failed for 'https://github.com/zxc/repo.git/'
Rozwiązaniem jest klonowanie po SSH a nie HTTPS.
Istniejące repozytorium możemy poprawić poleceniem:
git remote set-url origin git@github.com:username/repo.git
Więce na stronie Switching remote URLs from HTTPS to SSH
PS: Oczywiście, żeby procedura zadziałała należy skopiować klucz publiczny na githuba