前情提要
在刚刚使用git作为代码管理工具时,除了要记住git的基本操作命令以外往往会出现一些意想不到的问题,在这里整理出几个遇到过的问题。
出现问题的操作命令:git pull
问题一: error: unable to read askpass response from ‘/usr/libexec/openssh/gnome-ssh-askpass’
解决办法:echo 'unset SSH_ASKPASS' >> ~/.bashrc && source ~/.bashrc
问题二: Peer certificate cannot be authenticated with known CA certificates
解决办法:git config --global http.sslVerify false
问题三: git pull 一直需要输用户名密码
解决办法:
1.进入项目目录,输入:git config --global credential.helper store
2.再操作一次git pull,然后它会提示你输入账号密码,这一次之后就不需要再次输入密码了。