Saving ssh key fails

前端 未结 14 1088
予麋鹿
予麋鹿 2021-01-30 21:44

i just started a Git tutorial and I get to a deadend: I try to generate a rsa key part and it fails. I did this, in git bash:

ssh-keygen -t rsa -C \"myemail@myem         


        
相关标签:
14条回答
  • 2021-01-30 22:29

    You have to create the .ssh folder yourself for saving ssh keys.

    By the way, I used this path style: C:/Users/you/.ssh/id_rsa

    0 讨论(0)
  • 2021-01-30 22:30

    It looks like you are executing that command from a DOS session (see this thread), and that means you need to create the .ssh directory before said command.

    Or you can execute it from the bash session (part of the msysgit distribution), and it should work.

    0 讨论(0)
  • 2021-01-30 22:30

    I had the same issue. I had to provide the full path using Windows conventions. At this step:

    Enter file in which to save the key (/c/Users/Eva/.ssh/id_rsa):

    Provide the following value:

    c:\users\eva\.ssh\id_rsa

    0 讨论(0)
  • 2021-01-30 22:32

    On Windows 8.1 using CMDER, I created the ssh key with this file path /c/Users/youruser/.ssh/id_rsa_whatever, the problem was the : that I was using. With this path I didn't create the folder before running the command, there is no need to run mkdir because the command will create the folder automatically.

    0 讨论(0)
  • 2021-01-30 22:32

    For Linux on terminal use:

    ssh-keygen -t ed25519 -C "<comment>"
    

    this generate new modeled key. Or can create as:

    ssh-keygen -t rsa -b 2048 -C "any comment"
    

    Then continue following terminal.. give any name to the file as asked Again follow it with empty passphrase..and continue

    Then goto the /home/user/.ssh/id_ed25519 or /home/user/.ssh/id_rsa (is hidden file..look by doing ctrl+h to unhide hidden file) and copy it to gitlab => profile => setting => ssh => create new key there by pasting copied key and NOTE: public key always starts with ssh. Enjoy! Help:gitlab-Help

    0 讨论(0)
  • 2021-01-30 22:32

    For windows use enter button 3 times

    Enter file in which to save the key (/c/Users/Rupesh/.ssh/id_rsa): Enter passphrase (empty for no passphrase): Enter same passphrase again:

    its work for me...

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