Cannot push to github at any repository
git, github
Solution
the problem is in this line
git remote add origin https://github.com/demas/netrunner.git
git doesn't use your ssh keys when tries to access server via http protocol (Basic http auth is used in this case as far as i know ). Use ssh access (url looks like git@github.com:username/reponame.git)
Problem
It is very strange, but I cannot commit any repository (and new ones) to github. I have uploaded my ssh-key to github. ``` demas@demas-home:~/dotfiles$ ssh -T git@github.com Warning: Permanently added the RSA host key for IP address '192.30.252.130' to the list of known hosts. ``` Hi demas! You've successfully authenticated, but GitHub does not provide shell access. Now I create a new repository and try to push the first commit to github: ``` touch README.md git init git add README.md git commit -m "first commit" git remote add origin https://github.com/demas/netrunner.git git push -u origin master ``` But github asks my username and password. Why ? And even I put my username and password I will get the error: ``` demas@demas-home:~/netrunner$ git push -u origin master Username for 'https://github.com': demas Password for 'https://demas@github.com': remote: Invalid username or password. fatal: Authentication failed for 'https://github.com/demas/netrunner.git/' ``` I use two-factor authentification if it matters.