Git hub password freezes


#1

so I push a project through
It asks for my username. I give it.
It asks for my password. I start to type, and whoa! nothing is displaying on the terminal.
I hit enter and receive an error message. Wrong user name or password.
I type in the push code again, asked for username, then password, same problem. Any solutions?

traviloni:~/workspace (master) git push origin master Username for 'https://github.com': travolini Password for 'https://travolini@github.com': remote: Invalid username or password. fatal: Authentication failed for 'https://github.com/travolini/rails-website-again.git/' traviloni:~/workspace (master) github push origin master
bash: github: command not found
traviloni:~/workspace (master) $ git push origin master
Username for ‘https://github.com’: traviloni
Password for ‘https://traviloni@github.com’:
remote: Invalid username or password.
fatal: Authentication failed for ‘https://github.com/travolini/rails-website-again.git/


#2

This is a simple security feature: your password is not shown, so that it does not appear to anyone else looking at your terminal. Just type your password, and hit enter, and it will work.

A much simpler solution that doesn’t require you to enter your password every time is to switch to using SSH URLs, which you can find by going to your GitHub repository, clicking “Clone or Download”, then “Use SSH”, and copying the link (should look like git@github.com:username/repository.git). Then go to your terminal and type git remote set-url origin <SSH link here>. The last step is to add your public key to GitHub. The simplest way to do this is by connecting your Cloud9 account to GitHub from here, or you can add it manually without linking accounts by running c9 open ~/.ssh/id_rsa.pub, copying the contents, and adding them in your GitHub settings.


#3

Cheers @dannytech! That’s super-helpful!