错误描述:
[song@localhost ltdata]$ git push -u origin master (gnome-ssh-askpass:3916): Gtk-WARNING **: cannot open display: error: unable to read askpass response from '/usr/libexec/openssh/gnome-ssh-askpass' Username for 'https://github.com': 5dddd6@qq.com (gnome-ssh-askpass:3917): Gtk-WARNING **: cannot open display: error: unable to read askpass response from '/usr/libexec/openssh/gnome-ssh-askpass' Password for 'https://574482856@qq.com@github.com': Counting objects: 32, done.
竟然出现了错误 (gnome-ssh-askpass:32737): Gtk-WARNING **: cannot open display: error: unable to read askpass response from ‘/usr/libexec/openssh/gnome-ssh-askpass’
根本原因:
[song@localhost ltdata]$ cat /etc/profile.d/gnome-ssh-askpass.sh SSH_ASKPASS=/usr/libexec/openssh/gnome-ssh-askpass export SSH_ASKPASS
解决办法:
[song@localhost ltdata]$ unset SSH_ASKPASS
运行结果:
[song@localhost ltdata]$ git push -u origin master Username for 'https://github.com': afasdfasfdf@qq.com Password for 'https://adsfadsfadsf@qq.com@github.com': Branch master set up to track remote branch master from origin. Everything up-to-date
至此 问题解决,不会再出现错误提示。
(gnome-ssh-askpass:3917): Gtk-WARNING **: cannot open display:
error: unable to read askpass response from '/usr/libexec/openssh/gnome-ssh-askpass'