ssh-keygen' is not recognized as an internal o

2020-06-06 07:51发布

I am trying to add ssh keys for usage on github but on my xp on command prompt ssh-keygen does not work. It gives me the following error

ssh-keygen' is not recognized as an internal or external command.

Is there an alternative for generating keys on xp?

9条回答
狗以群分
2楼-- · 2020-06-06 08:49

Are you running msysgit, or some other form of Windows git installation? msysgit is only one possible way to run git on Windows but it's probably also the simplest one. It's also the way recommended by the git website at http://git-scm.org/ .

If you are using msysgit, then you need to run the command in Git Bash, not in a standard Windows command line prompt. Git Bash is a prompt that is installed for you by msysgit, and is basically the most common Linux command line shell (bash) packaged for Windows to facilitate command line usage of git. msysgit should also install the ssh-keygen program in a place where it is accessible from Git Bash, but not necessarily from your usual Windows command line prompt.

查看更多
小情绪 Triste *
3楼-- · 2020-06-06 08:51

Search your git directory if you already install git

Use git bash should be on your C:\Program Files\Git\bin depend on your installation location

If you already add the path just run sh on your cmd or open sh.exe

type ssh-keygen

Then just insert name and passphrase (You can just type empty string).

查看更多
ら.Afraid
4楼-- · 2020-06-06 08:52
  • Install msysgit
  • Right-click on any file
  • Select "Select Git Bash here" from menu
  • Run ssh-keygen command from a git bash terminal
查看更多
登录 后发表回答