github使用问题汇总

[email protected]: Permission denied (publickey).
问题描述:github中已在项目组内,安装了git后无法从项目中clone代码
问题原因:未配置git
问题解决:配置git

本地git配置
1、git bash中,分别运行下述命令创建本地账号
git config --global user.name "username"
git config --global user.email "[email protected]"
检查是否成功配置
git config --global --list
2、生成本机ssh
ssh-keygen -t rsa
默认路径:/c/Users/用户名/.ssh/
3、将本机公钥添加到github账号中
本机公钥文件:id_rsa.pub ,手动复制可使用txt打开
登录GitHub -> Settings -> SSH and GPG keys -> New SSH Keys ,填入本机公钥并确认
测试是否成功配置
ssh -T [email protected]

猜你喜欢

转载自www.cnblogs.com/donemeb/p/12541387.html