When I enter ssh-keygen -t rsa -C "[email protected]" in git it gives "Too many arguments" error

Jitendra Vyas picture Jitendra Vyas · Sep 6, 2011 · Viewed 36.1k times · Source

When I enter ssh-keygen -t rsa -C "[email protected]" in git it gives a "Too many arguments" error. How do you solve this issue?

Screenshotenter image description here

Answer

user456814 picture user456814 · Dec 5, 2011

I also encountered a "Too many arguments" error using this command, but the cause and solution were a little different. I copy and pasted the following command (from an Outlook 2010 email) into the command line:

ssh-keygen –t rsa

and got the error. A coworker suggested just typing the command instead of copy and pasting it. I tried that and it worked, so I must have copy and pasted extra characters by accident (maybe some whitespace or null characters).