Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Running .cmd for SSH agent and putty integration #1963

Closed
1 of 3 tasks
nephewtom opened this issue Nov 28, 2018 · 6 comments
Closed
1 of 3 tasks

Running .cmd for SSH agent and putty integration #1963

nephewtom opened this issue Nov 28, 2018 · 6 comments

Comments

@nephewtom
Copy link

Hi.
I am trying to integrate what is described here:
https://github.com/cmderdev/cmder/wiki/Integrate-SSH-Agent-or-PuTTY-Agent

But when I do that (uncommenting the lines in current config/user-profile.cmd), when cmder starts, it misses colors and it is like it goes back to traditional CMD prompt.
Same as executing manually the first .cmd like this:

capture
capture2

I expected it would source the .cmd script without breaking the cmder prompt, etc...
Is this supposed to go back to CMD? Is this the way it is supposed to run?
How can I run those without changing it?

Regards.

Purpose of the issue

  • Bug report (encountered problems/errors)
  • Feature request (request for new functionality)
  • Question

Description of the issue

@nephewtom
Copy link
Author

Shouldn´t call execute the .cmd file seamlessly?

@daxgames
Copy link
Member

I just uncommented:

:: uncomment this next two lines to use pageant as the ssh authentication agent
SET SSH_AUTH_SOCK=/tmp/.ssh-pageant-auth-sock
call "%GIT_INSTALL_ROOT%/cmd/start-ssh-pageant.cmd"

and got the below in my next session:

Starting ssh-pageant...
SSH_AUTH_SOCK='/tmp/.ssh-pageant-auth-sock'
SSH_PAGEANT_PID=18156

C:\Users\user\cmderdev(master -> origin)$

All is working as expected.

@daxgames
Copy link
Member

@tomasorti maybe your user-profile is from an older version of Cmder. The commands I uncommented ore different than yours.

@nephewtom
Copy link
Author

This is the content of current user_profile.cmd on cmder version 1.3.8 is:

:: use this file to run your own startup commands
:: use in front of the command to prevent printing the command

:: uncomment this to have the ssh agent load when cmder starts
:: call "%GIT_INSTALL_ROOT%/cmd/start-ssh-agent.cmd"

:: uncomment the next two lines to use pageant as the ssh authentication agent
:: SET SSH_AUTH_SOCK=/tmp/.ssh-pageant-auth-sock
:: call "%GIT_INSTALL_ROOT%/cmd/start-ssh-pageant.cmd"

:: you can add your plugins to the cmder path like so
:: set "PATH=%CMDER_ROOT%\vendor\whatever;%PATH%"

:: arguments in this batch are passed from init.bat, you can quickly parse them like so:
:: more useage can be seen by typing "cexec /?"

:: %ccall% "/customOption" "command/program"

@echo off

The command that gets executed first is the ssh-agent cmd file:
call "%GIT_INSTALL_ROOT%/cmd/start-ssh-agent.cmd"
That is the one that makes the colors gone and shows the traditional CMD prompt.

@daxgames
Copy link
Member

@tomasorti Have a look at #1807 and #1781. From what I saw #1781 was best.

@daxgames
Copy link
Member

@tomasorti - Just a little more info.

%GIT_INSTALL_ROOT%/cmd/start-ssh-agent.cmd is provided by the Git for Windows Package that Cmder uses. It is not maintained by us and thus can't be fixed by us.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants