1

I'm using windows 8 64-bit and the latest version of GIT.
I'm trying to generate ssh keys using ssh-keygen -t rsa -C "[email protected]" but cannot create the key I'm getting an error.

http://content.screencast.com/users/DineshJasti/folders/Jing/media/24c3f3fc-43d6-437b-b1ca-083946afc55b/2013-10-20_2115.png

I tried giving some name to my key then it gave me an error:

could not connect to your authentication agent

http://content.screencast.com/users/DineshJasti/folders/Jing/media/8a88fad4-8b1d-40de-9dc7-4c5f9db12f20/2013-10-20_2132.png

Can some one help me to solve this problem?

0

2 Answers 2

1

Based on your working directory, it seems you are not in the .ssh folder. I think that's what is causing the problem.

Github provides an excellent step by step tutorial to create an ssh key and add it later on Github.

Sign up to request clarification or add additional context in comments.

3 Comments

That is the tutorial I have been following and I also tried doing the same from .ssh directory but no change in result.
Can you echo %HOMEPATH% and tell me what it gives you?
Homepath returns a path to my user directory. Screen shot screencast.com/t/D50waSfjs
0

ssh key generation is based on the environment variable HOME.
HOME isn't defined by default.
It is defined only if you start a git session through git-cmd.bat:

@if not exist "%HOME%" @set HOME=%HOMEDRIVE%%HOMEPATH%
@if not exist "%HOME%" @set HOME=%USERPROFILE%

Make sure that %HOME% exists, and everything else ssh-related should work just fine.

12 Comments

Echo home returns home and homepath gives me the user directory. Screen shot screencast.com/t/D50waSfjs
@DineshJasti your screenshot shows that HOME isn't defined. My answer stands.
Tanq VonC excuting this '@if not exist "%HOME%" @set HOME=%USERPROFILE%' solved my problem but I'm unable to add it when I execute 'ssh-add' it says "Could not open a connection to your authentication agent".Any solution plz..
@DineshJasti are you sure you want to manage ssh keys with passphrase? If so, try stackoverflow.com/a/7353153/6309 (add a bashrc file in C:\your\path\to\PortableGit-1.8.4-preview20130916\etc) to make sure the ssh-agent is running.
Sry for the late reply.Let me give you a overview of my situation I have installed and used GIT in my old laptop and have been using it along with pycharm and Heroku but now I have got a new laptop in which I'm trying to install and use git I have set the global name and email ID and now am trying to create a SSH key to link it with my account my main purpose is to use Heroku and I couldn't get it done coz of all these errors.So,now if u there is any other way plz guide me.And I havent set any pass phrase during the key generation.
|

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.