cmder icon indicating copy to clipboard operation
cmder copied to clipboard

call "%GIT_INSTALL_ROOT%/cmd/start-ssh-agent.cmd" causes lambda prompt not appearing

Open Kurdym opened this issue 8 years ago • 3 comments

On a fresh unzipped cmder, I get this on startup:

image

When uncommenting "call "%GIT_INSTALL_ROOT%/cmd/start-ssh-agent.cmd"", and then startup, I first have to exit to get to the Lambda:

image

I want the second situation to be like the first, directly to the Lambda prompt.

Kurdym avatar Jun 10 '18 20:06 Kurdym

This is being caused by the last few lines of start-ssh-agent.cmd. Specifically these lines (84-86):

@IF NOT ERRORLEVEL 1 @(
    @CALL cmd %*
)

Here, a new cmd prompt is being spawned with the arguments supplied by %* (which currently is empty, causing the prompt to wait). Unfortunately these lines of code are provided by git-for-windows, not cmder.

A workaround that you can use would be to adjust the line in user-profile.cmd to say:

call "%GIT_INSTALL_ROOT%/cmd/start-ssh-agent.cmd" /k exit

The /k exit will be used as the arguments supplied by %* and will effectively auto exit the new cmd for you.

Archez avatar Jun 27 '18 00:06 Archez

@Archez I am having exactly the same issue but your solution is working partially for me. Having the line as you said before in the user-profile.cmd does start the agent properly but I got the following message after run the command: ssh-add ~/.ssh/id_sls:

λ ssh-add ~/.ssh/id_sls
Error connecting to agent: No such file or directory

Do you have any suggestion and/or idea in how to fix this?

reypm avatar Jul 10 '18 23:07 reypm

Hey @reypm I had the same issue as you and found an answer on #1781 Hope it'll solve your problem

BrySi avatar Jul 18 '18 06:07 BrySi