SSH Pageant Error
-
I'm trying to use Pageant so I can
ssh
without entering my password. I have added the following to C:\laragon\usr\user.cmdcall "%GIT_INSTALL_ROOT%\cmd\start-ssh-pageant.cmd"
and I have set the user environment variable
SSH_AUTH_SOCK=/tmp/.ssh-pageant-username
.But now when opening terminal from Laragon, I get the following output
Starting ssh-pageant... '-qra' is not recognized as an internal or external command, operable program or batch file.
I'm not sure if it's related, but I also am unable to use single quotes for strings with some commands in the terminal either. ie:
git commit -m 'My message here' error: pathspec 'message' did not match any file(s) known to git. error: pathspec 'here'' did not match any file(s) known to git.
Thank you.
-
@cworrell
You can follow my instructions below:- Fix PATH issue:
Open the file C:\laragon\bin\cmder\vendor\init.bat, ensure this block of code
if exist "%USER_DIR%\user.cmd" ( rem create this file and place your own command in there call "%USER_DIR%\user.cmd" ) else ( echo Creating user startup file: "%USER_DIR%\user.cmd" ( echo :: use this file to run your own startup commands echo :: use in front of the command to prevent printing the command echo. echo :: call %%GIT_INSTALL_ROOT%%/cmd/start-ssh-agent.cmd echo :: set PATH=%%USER_DIR%%\bin\whatever;%%PATH%% echo. echo :: cmd /c start http://localhost echo. ) > "%USER_DIR%\user.cmd" :: cd /d "%CMDER_ROOT%\..\..\www" rem )
is located below
if exist "%CMDER_ROOT%\..\laragon\laragon.cmd" ( :: call Laragon own commands call "%CMDER_ROOT%\..\laragon\laragon.cmd" )
- Add this code block to C:\laragon\usr\user.cmd
set SSH_AUTH_SOCK=/tmp/.ssh-pageant-%USERNAME% call start-ssh-pageant.cmd start pageant C:\key1.ppk C:\key2.ppk
Just change
key1
.ppk (key2
.ppk, ...) to proper path(s)That's all.
- Fix PATH issue:
-
@leokhoa
thanks very much.. so is that a bug with the current version of laragon? the code blocks being switched like that?Also, the
set SSH_AUTH_SOCK
section did not work for me, but setting that as a user environment variable did the trick.
-
@leokhoa
Any ideas about not being able to use single quotes for certain commands?
-
You may say it a bug
. The code moving helps you type commands short (without putting full paths)
@cworrell said in SSH Pageant Error:
@leokhoa
thanks very much.. so is that a bug with the current version of laragon? the code blocks being switched like that?Also, the
set SSH_AUTH_SOCK
section did not work for me, but setting that as a user environment variable did the trick.
-
I have no idea. It may be a bug of msysgit.
@cworrell said in SSH Pageant Error:@leokhoa
Any ideas about not being able to use single quotes for certain commands?