lukesampson / pshazz

Give your powershell some pizazz.
The Unlicense
577 stars 40 forks source link

Error on askpass.exe #24

Closed mrmckeb closed 5 years ago

mrmckeb commented 8 years ago

I'm running Windows 10, PowerShell 5, and I get the following when I try to push to GitHub.

project branch $ git push
error: unable to read askpass response from 'C:\Users\username\appdata\local\scoop\apps\pshazz\0.2014.11.25\libexec\askpass.exe'

Let me know if there's anything else I can provide to help with troubleshooting.

cardonator commented 8 years ago

askpass seems like it is in a broken state to me. Pshazz isn't loading ssh-agent at PS launch for me nor does ssh even try to use private key login it seems like ever since the last update I did a few weeks ago.

philschonholzer commented 8 years ago

Got the same problem. Executing askpass.exe gives me also this:

Resize master = $ askpass

Unhandled Exception: System.IndexOutOfRangeException: Index was outside the bounds of the array.
   at askpass.Program.Main(String[] args)
lukesampson commented 8 years ago

askpass.exe is only really expecting to be called by sshagent (by setting the $env:SSH_ASKPASS variable)—so it's expecting sshagent to call it with a first argument like "Enter passphrase for [username]". (source code for askpass.exe here)

The IndexOutOfRangeException shouldn't really be a problem if sshagent is hooked up correctly, so maybe the problem is elsewhere.

Is ssh being loaded by your theme?

ionTea commented 8 years ago

Hey, I get the same error message - these programs are installed in powershell (with scoop) 7zip (15.14)
concfg (0.2016.01.25) coreutils (5.97.3) curl (7.46.0) go (1.6) grep (2.5.4) less (394) nodejs (5.6.0) openssh (5.4p1-1) pshazz (0.2015.11.13) sed (4.2.1) sudo (0.2014.07.18) vim (7.4)

Is there any conflicts that i should be aware of?

smeijer commented 6 years ago

Same problem as @philschonholzer. To exclude conflicts from @ionTea, I only have concfg installed.

Installed apps:
  concfg 0.2018.5.27
scoop install pshazz
Unhandled Exception: System.IndexOutOfRangeException: Index was outside the bounds of the array.
   at askpass.Program.Main(String[] args)
mykolapolonskyi commented 6 years ago

image uninstall optional feature OpennSSH client helps solve issue -> powershell start to use ssh installed with scoop

TCB13 commented 6 years ago

@smeijer I'm having the same issue, check this: https://github.com/lukesampson/scoop/issues/2537

vertexportus commented 5 years ago

is there a fix for this ?

chawyehsu commented 5 years ago

If anyone want to avoid the problem temporarily, you could remove askpass.exe from ssh.ps1 but keep other functionality, like ssh.ps1. Then put it into %USERPROFILE%\pshazz\plugins.

jwhipp commented 5 years ago

Having the same problem with askpass.exe, I decided to use this SSH config as a work around:

CLI: StrictHostKeyChecking=accept-new Config: StrictHostKeyChecking accept-new

I don't want to disable host key checking, and this is a bit of a compromise. It'll cause ssh accept new keys automatically but won't accept a host key that has changed.

superdump commented 5 years ago

@jwhipp where do you put those configuration options?

jwhipp commented 5 years ago

@superdump

Here's how to use it:

On the command line:

ssh -o StrictHostKeyChecking=accept-new user@host

In the config ~.ssh\config:

Host *
    StrictHostKeyChecking accept-new

I just tossed it in the ~.ssh\config.