【问题标题】:how to make ssh keygen work properly to set ssh keys for cloning and other purposes如何使 ssh keygen 正常工作以设置用于克隆和其他目的的 ssh 密钥
【发布时间】:2020-02-19 13:41:23
【问题描述】:

在下面的代码中

############-L1 MINGW64 ~
$ which git
/mingw64/bin/git

############-L1 MINGW64 ~
$ git --version
git version 2.22.0.windows.1

############-L1 MINGW64 ~
$ which git -v
GNU which v2.21, Copyright (C) 1999 - 2015 Carlo Wood.
GNU which comes with ABSOLUTELY NO WARRANTY;
This program is free software; your freedom to use, change
and distribute this program is protected by the GPL.

############-L1 MINGW64 ~
$ ssh-keygen -t rsa

############-L1 MINGW64 ~
$

在 Git Bash v2.22 中运行。我无法使用上面的 ssh-keygen 命令创建 SSH 密钥。我已确保使用 Git 的凭据管理器清除了凭据。安装完成后,我确保重新启动计算机。有什么建议可以让我完成这项工作吗? 我需要这个,以便我可以从我的 GitLab 帐户中的本地存储库中克隆一些东西,并执行其他需要 SSH 密钥的功能。

【问题讨论】:

  • 你的 '~/.ssh` 目录的内容是什么?

标签: git ssh gitlab git-bash ssh-keygen


【解决方案1】:

完整的命令是

ssh-keygen -t rsa -P "" -m PEM 
cd
cd .ssh
ls -alrth

检查id_rsa/id_rsa.pub 是否已创建。

【讨论】:

    猜你喜欢
    • 2021-09-10
    • 2018-09-08
    • 2011-09-24
    • 2020-08-06
    • 1970-01-01
    • 2016-08-15
    • 2023-03-08
    • 2016-09-15
    • 2017-06-02
    相关资源
    最近更新 更多