4

I used the following command in CMD:

eval $(ssh-agent)

And the output is:

'eval' is not recognized as an internal or external, operable program or batch file.

Looking for the solution in CMD, it works fine in gitbash

Sourav
  • 393
  • 2
  • 18
kurriking
  • 53
  • 1
  • 3
  • Where are you typing this, exactly? – merlin2011 Apr 20 '14 at 00:21
  • typing in the command prompt with RoR. What do you mean by 'duplicate'? – kurriking Apr 20 '14 at 16:07
  • Please explain what terminal shell and OS you are using. Are you actually trying to use this from within interactive Ruby (`irb`)? Or a Windows command shell? –  Apr 20 '14 at 16:54
  • How did you install Git? I don't think Ruby on Rails comes with its own command prompt. What happens when you type just `ssh-agent`? Do you even have that available? If not, you'll either have to install it, or you can try install [msysgit](http://git-scm.com/), which already comes with it. –  Apr 20 '14 at 17:46
  • 1
    Guys I don't think its a duplicate. I tried that solution but it require 'eval', which I cannot use. I'm on a Win 7, cygwin (i think), and a whole lotta ignorance as I'm traversing M.Hartl's RoR tutorial. (Thanks ruby.railstutorial.org). Anything else ? Could it be a Heroku issue? – kurriking Apr 22 '14 at 03:32
  • @kurriking are you sure that you're using [cygwin](http://www.cygwin.com/)? I have cygwin too, and it has both `eval` and `exec`. Did you forget the backticks? –  May 01 '14 at 19:51
  • use gitbash for this .. agent primary id is created without creating any error – Sourav Jan 23 '20 at 09:37

1 Answers1

1

There are other commands that you can try to start the ssh-agent, depending on your shell and operating system. Here is an another command that you could try (from the answers to this question):

exec ssh-agent bash
Community
  • 1
  • 1