Error when generating an SSH key with Git: “no such file”

前端 未结 2 1139
花落未央
花落未央 2021-02-05 18:27

I continually run into the same error when I try to generate an SSH key:

Generating public/private rsa key pair.
Enter file in which to save the key (/home/konra         


        
相关标签:
2条回答
  • 2021-02-05 18:54

    On msysgit, you need first to set the user environment variable HOME (which isn't set by default in Windows).

    HOME can be set to any directory you want, you only have to make sure you have the right to write in it (and that the directory exists and a .ssh under it exists too).

    0 讨论(0)
  • 2021-02-05 18:56

    Drop to a command line and type:

    ssh-keygen -t rsa
    

    And follow the prompts there. I'm pretty sure git's doing exactly that under the hood for you.

    0 讨论(0)
提交回复
热议问题