Version Control Console revealed that things were getting hung up on: remote: ssh_askpass: exec(/usr/libexec/ssh-askpass): No such file or directory. After confirming that there was no ssh-askpass on my Mac OS X Leopard system, I turned to Google. After a few misses, I stumbled across Joe Mocker's blog post about VNC tunneled through SSH on OS X. Embedded in that post is this shell/AppleScript:
#! /bin/sh
#
# An SSH_ASKPASS command for MacOS X
#
# Author: Joseph Mocker, Sun Microsystems
#
# To use this script:
# setenv SSH_ASKPASS "macos-askpass"
# setenv DISPLAY ":0"
#
TITLE=${MACOS_ASKPASS_TITLE:-"SSH"}
DIALOG="display dialog \"$@\" default answer \"\" with title \"$TITLE\""
DIALOG="$DIALOG with icon caution with hidden answer"
result=`osascript -e 'tell application "Finder"' -e "activate" \
-e "$DIALOG" -e 'end tell'`
if [ "$result" = "" ]; then
exit 1
else
echo "$result" | sed -e 's/^text returned://' -e 's/, button returned:.*$//'
exit 0
fi
I dropped this code into a script at
/usr/libexec/ssh-askpass and now when I push from IntelliJ:
Ugly, but it works. Now I just wish that the IntelliJ Mercurial plugin would consult the
.hg/hgrc file for the remote repository or at least remember the value I type in when I pushed the last time, so I don't have to type in some long ssh://user@host.org/path/to/the/repo every time.

6 comments:
http://code.google.com/p/mercurialidea/issues/list
http://code.google.com/p/mercurialidea/issues/detail?id=40
I may try my hand at a patch this weekend if I have some free time.
Would it avoid the password prompt if you put your public key on the target machine? (See this tutorial if you're unfamiliar with ssh public keys)
Yeah, that's the other option. I have that setup on some machines I administer. I guess I've just been too lazy up til this point since I didn't do a lot of development via IDEA with this remote repository.
It's so nice blog with informative world development.
I like to read more, keep on updating.
seriously thank you :) netbeans was b$#@# about this, switched from Coda but... this wasn't makin it much easier :) totally fixed my problem too!
thanks thanks thanks! :)
Post a Comment