git push、git pull 需要输入用户名和密码

注意:通过https方式clone下来的,在git push 时是需要输入用户名和密码,即使配置了ssh密钥也是不起作用的

现在我们把https 方式改成 ssh密钥的方式,解决方案如下:

1. 首先查看 项目 git clone 的方式,用以下命令:

git remote -v 

结果是https://*****.com

2. 删除原clone方式:

git remote rm origin

3. 添加新的clone方式:

git remote add origin git@github.com*********.git
原文地址:https://www.cnblogs.com/yyh1/p/15619480.html