ssh - Using git without X11 forwarding -
when try use git on remote machine (via ssh), complains of not being able connect display. since i'm using ssh connection within screen environment different machines, cannot use x11 forwarding. however, not want graphical interface typing in password.
command:
$ git pull
connect localhost port 6010: connection refused
(gnome-ssh-askpass:7316): gtk-warning **: cannot open display: localhost:36.0
version:
$ git --version
git version 1.7.1
how can around need graphical connection here?
please read gitcredentials(7)
manual page (you can run git credentials
read locally).
it explains how git manages problem of obtaining credentials.
namely, usage of git_askpass
environment variable might of interest you.
alternatively, allow ssh client forward connection local agent (the thing keeps keys) git running in remote session use same identities. of coure, use if applicable (that is, identities same). in case, ssh won't supposedly try ask password since serviced agent. read ssh_config(5)
manual page , forwardagent
configuration option.
to reiterate, root of problem appears in ssh needs ask credentials, , have make sure doesn't. hence maybe solution simple running ssh-agent
in remote session , ssh-add
-ing necessary identities before running git or making sure environment variables , git configuration settings related obtaining credentials ssh have meaningful values.
Comments
Post a Comment