Skip to contentSkip to conversation

password for push/pull in case of git+ssh://repo

BUG/RFC git-gui Ivo Alxneit 3 participants 4 messages Jun 15, 2016

lore
Share & tools
lore
#0 lore raw

when i use git-gui (0.9.0) to push/pull to/from a git+ssh://repo i have to supply my password to ssh. i get the password prompt from ssh on the controlling shell. as i often use several shells and git-gui might run in the background it is rather bothering to find the correct shell where ssh expects the password. could this be changed (in a safe way) in git-gui e.g. like pinentry pops up a window when gpg is used to sign emails?

p.s. please cc me. i have not subscribed to the list

thanks

Signature · 5 lines
Dr. Ivo Alxneit
Laboratory for Solar Technology   phone: +41 56 310 4092
Paul Scherrer Institute             fax: +41 56 310 2688
CH-5232 Villigen                   http://solar.web.psi.ch
Switzerland                   gnupg key: 0x515E30C7
#1 lore raw
Quoted 7 lines · Ivo Alxneit

when i use git-gui (0.9.0) to push/pull to/from a git+ssh://repo i have to supply my password to ssh. i get the password prompt from ssh on the controlling shell. as i often use several shells and git-gui might run in the background it is rather bothering to find the correct shell where ssh expects the password. could this be changed (in a safe way) in git-gui e.g. like pinentry pops up a window when gpg is used to sign emails?

IIRC, ssh will run the 'ssh-askpass' program if DISPLAY is set and there is no tty available, so git-gui should be able to set that up (or you probably can yourself by simply backgrounding git-gui and closing the terminal).

-Peff

#2 lore raw
In reply to Ivo Alxneit
Quoted 8 lines · Ivo Alxneit

when i use git-gui (0.9.0) to push/pull to/from a git+ssh://repo i have to supply my password to ssh. i get the password prompt from ssh on the controlling shell. as i often use several shells and git-gui might run in the background it is rather bothering to find the correct shell where ssh expects the password. could this be changed (in a safe way) in git-gui e.g. like pinentry pops up a window when gpg is used to sign emails?

Quoted 4 lines

p.s. please cc me. i have not subscribed to the list

thanks

I know this doesn't answer the problem exactly, but if you use ssh keys and some sort of key management utility (such as Keychain or maybe Gnome keyring?), you can dodge the password entry problem and never have to enter a password (pending you register your ssh key with the server [ex: ssh-copy-id servername])

Another option that might answer your problem (and could be potentially integrated into git-gui) is the usage of the SSH_ASKPASS environment variable.

SSH_ASKPASS is a program to execute to get the passphrase that works by reading console output from the program.

#3 lore raw

Re: [BUG/RFC git-gui] password for push/pull in case ofgit+ssh://repo

Quoted 20 lines · Thomas Harning
Quoted 8 lines · Ivo Alxneit

when i use git-gui (0.9.0) to push/pull to/from a git+ssh://repo i have to supply my password to ssh. i get the password prompt from ssh on the controlling shell. as i often use several shells and git-gui might run in the background it is rather bothering to find the correct shell where ssh expects the password. could this be changed (in a safe way) in git-gui e.g. like pinentry pops up a window when gpg is used to sign emails?

Quoted 4 lines

p.s. please cc me. i have not subscribed to the list

thanks

I know this doesn't answer the problem exactly, but if you use ssh keys and some sort of key management utility (such as Keychain or maybe Gnome keyring?), you can dodge the password entry problem and never have to enter a password (pending you register your ssh key with the server [ex:
ssh-copy-id servername])

Quoted 6 lines

Another option that might answer your problem (and could be potentially integrated into git-gui) is the usage of the SSH_ASKPASS environment variable.

SSH_ASKPASS is a program to execute to get the passphrase that works by reading console output from the program.

thanks to both of you.

in essence you are telling me to use the infrastructure provided by ssh to ask fo the password. i'll try :-)

Signature · 5 lines
Dr. Ivo Alxneit
Laboratory for Solar Technology   phone: +41 56 310 4092
Paul Scherrer Institute             fax: +41 56 310 2688
CH-5232 Villigen                   http://solar.web.psi.ch
Switzerland                   gnupg key: 0x515E30C7