首页 > 解决方案 > 如何在 git 中创建 SSH 密钥

问题描述

我使用以下命令在 git 中创建 SSH 密钥

$ ssh-keygen -t rsa -b 4096 -C "your_email@example.com"

在 git bash 上,但是当我在 bash 上输入此命令时,它显示另一个命令列表并且不生成 SSH 密钥。那么如何生成密钥呢?

标签: gitssh-keys

解决方案


使用创建您的 ssh 密钥ssh-keygen -o -t rsa -b 4096 -C "email@example.com"

在文件夹 ~./ssh 中列出文件后,查看您的密钥是否存在。利用:

ls ~/.ssh/


推荐阅读