git获取公钥私钥

1,设置git用户名和email

	git config --global user.name "username"//你的用户名
	git config --global user.email "email"//你要设置的email

2,如何查看你的用户名和密码

	git config user.name
	git config user.email

3,设置秘钥ssh生成
(1)查看是否已经生成了秘钥 cd ~/.ssh
在这里插入图片描述
(2)如果没有“id_rsa”和“id_rsa.pub”(id_rsa是私钥,id_rsa_pub是公钥)
使用命令:

		ssh-keygen -t rsa -C “这里是你的email”

这就获得了git的秘钥。。。。

发布了54 篇原创文章 · 获赞 13 · 访问量 2万+

猜你喜欢

转载自blog.csdn.net/liutaiyi8/article/details/99886578