-
在Windows中添加git ssh key
$ ssh-keygen -t ed25519 -C "your_email@example.com"
或者 ssh-keygen -t rsa -b 4096 -C "your_email@example.com"
Enter a file in which to save the key (/c/Users/you/.ssh/id_algorithm):[Press enter]
复制并自定义名字,回车 /c/Users/you/.ssh/id_algorithm_CUSTOMIZED_NAME
- passphrase 可以不输入,连按两次回车.
- 这时 ~/.ssh/目录下生成两个文件: id_algorithm_CUSTOMIZED_NAME 私钥;id_algorithm_CUSTOMIZED_NAME.pub 公钥
- 将公钥添加到Github 账户: 复制id_algorithm_CUSTOMIZED_NAME.pub 的内容,全部黏贴:
- 打开 ssh-agent:
eval "$(ssh-agent -s)"
- 添加私钥:
ssh-add ~/.ssh/id_algorithm_CUSTOMIZED_NAME
- 此时使用 git clone 不会再出现 permission denied 情况
-
相关阅读:
Python之struct模块浅谈
看头发知健康
ZeroMQ:云计算时代最好的通讯库
粗盐热敷疗法经验汇总
百度2011校招笔试算法题一
new/delete 和malloc/free 的区别一般汇总
Trie字典树
百度2012校招笔试题之全排列与组合
百度2011校招笔试算法题二
执行程序的内存分布总结
-
原文地址:https://www.cnblogs.com/mrlonely2018/p/15423986.html
Copyright © 2020-2023
润新知