1、使用git的时候,gnome-ssh-askpass出现“error: cannot run /usr/libexec/openssh/gnome-ssh-askpass: No such file or directory”错误:

shenweiyan@localhost :: ~
=> git push origin master
error: cannot run /usr/libexec/openssh/gnome-ssh-askpass: No such file or directory
Username for 'https://git.oschina.net': shenweiyan
error: cannot run /usr/libexec/openssh/gnome-ssh-askpass: No such file or directory
Password for 'https://[email protected]':
Counting objects: , done.
Delta compression using up to  threads.
Compressing objects: % (/), done.
Writing objects: % (/),  bytes |  bytes/s, done.
Total  (delta ), reused  (delta )
To https://git.oschina.net/shenweiyan/BirthDF.git
   89f911f..809863f  master -> master

解决: yum install openssh-askpass


2、安装完openssh-askpass,又出现“error: unable to read askpass response from '/usr/libexec/openssh/gnome-ssh-askpass'”问题:

shenweiyan@localhost :: ~
=> git push origin master

(gnome-): Gtk-WARNING **: cannot open display:
error: unable to read askpass response from '/usr/libexec/openssh/gnome-ssh-askpass'
Username for 'https://git.oschina.net':

解决:echo 'unset SSH_ASKPASS' >>~/.bashrc && source ~/.bashrc


04-14 00:03