如何在git中创建SSH密钥 [英] How to Create SSH Key in git

查看:98
本文介绍了如何在git中创建SSH密钥的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

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

I using the following command to create SSH key in git

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

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

on git bash, but when I enter this command on bash it is displaying another command list and not generate SSH Key. Then how can I generate Key?

推荐答案

使用ssh-keygen -o -t rsa -b 4096 -C "email@example.com"

在文件夹〜./ssh中的列表文件之后,查看您的密钥是否存在.使用:

After list file in folder ~./ssh and see if your key exist. Use:

ls ~/.ssh/

这篇关于如何在git中创建SSH密钥的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆