I run git push -u origin master
It tells me that "Permission denied (public key) fatal: The remote end hung up unexpectedly"
Then I looked up on the internet and found that I had to generate an ssh key for my account on GitHub. However, upon doing so, when I tried to do ssh-keygen -t rsa "email@youremail.com" it simply said ssh-keygen is not recognized. I tried doing mkdir C:\ssh but that didn't work. If it helps I'm using Ruby Rails and I'm on a Windows computer. Could anyone help me?
If you have installed Git, and is installed at C:\Program Files, follow as below
You probably should check this. Windows doesn't have that command built in.
I followed below in windows (With Git for Windows installed)
Note:- this creates the key files under your personal profile folder C:\Users\YourUserID\.ssh\
don't do anything just type in your command prompt
then you got like this
this should must work.
I just had this issue and thought I'd share what I thought was an easier way around this.
Open git-bash and run the same command with the addition of -C since you're commenting in your email address:
ssh-keygen -t rsa -C "email@youremail.com"
command. That's it.git-bash should have been installed when you installed git. If you can't find it you can check C:\Program Files\Git\Git Bash
The first time I did this it failed to create the .ssh folder for me so I had to open a standard Command Prompt and mkdir C:\Users\yourusername\.ssh
I found an easy solution to fix this :
In the command prompt, go to your git\bin directory, and then execute your commands from here