git使用一直需要输入密码的解决办法

git服务器安装完后,客户端使用的时候,一直需要输入密码才可以使用,在此之前,已经将公钥放到了authorized_keys里。

解决办法:

1、修改ssh配置文件,文件路径/etc/ssh/sshd-config,将下面两项改为yes。

RSAAuthentication yes
PubkeyAuthentication yes

修改后重启ssh,重启命令:service sshd restart.

2、执行1方法如果依然不行的,将git用户的密码重新修改,参考:https://blog.csdn.net/anmingda1990/article/details/82351506

原文地址:https://www.cnblogs.com/ljl-blog/p/12120563.html