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

Adding script to enable SSH-agent #193 #352

Merged
merged 3 commits into from
Dec 18, 2014
Merged

Conversation

ogrim
Copy link
Contributor

@ogrim ogrim commented Dec 17, 2014

Adding agent-script to bin-folder and a commented out call in init.bat

Re-did it for the development branch, sorry about the mixup

Adding agent-script to bin-folder and a commented out call in init.bat
@hermanocabral
Copy link

Does this work if %HOME% has a space in it?

@ogrim
Copy link
Contributor Author

ogrim commented Dec 17, 2014

Made a quick test on Win 8.1, and it does not. I'll take a loot at it, and maybe the original author, @Shoozza, has any ideas?

@@ -44,3 +44,5 @@
@cd /d "%HOME%"
)
)

:: @call "%CMDER_ROOT%/bin/agent.cmd"
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could you add something to README.md telling users to uncomment this if needed? Thanks.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@MartiUK , done.

@MartiUK
Copy link
Member

MartiUK commented Dec 17, 2014

About $HOME:

You can usually fix it by turning on delayed expansion and use variables with !var! instead of %var%.

Try that.

@Shoozza
Copy link
Contributor

Shoozza commented Dec 18, 2014

Should be fixed in the latest gist https://gist.github.com/Shoozza/8fe8b0c85fa89cd3b1c4

@ogrim
Copy link
Contributor Author

ogrim commented Dec 18, 2014

Thanks, @Shoozza, this fixed the issue.

C:\sites\cmder\bin (sshagent)
λ .\agent.cmd
Enter passphrase for C:\test home\.ssh\id_rsa:
Identity added: C:\test home\.ssh\id_rsa (C:\test home\.ssh\id_rsa)

@MartiUK
Copy link
Member

MartiUK commented Dec 18, 2014

Are you confident this can be merged @ogrim?

@ogrim
Copy link
Contributor Author

ogrim commented Dec 18, 2014

Just tested it again and it handles PATH with spaces (test home), so I am confident it is good, @MartiUK

@MartiUK
Copy link
Member

MartiUK commented Dec 18, 2014

Alright cool.

MartiUK added a commit that referenced this pull request Dec 18, 2014
Adding script to enable SSH-agent #193
@MartiUK MartiUK merged commit 11753fd into cmderdev:development Dec 18, 2014
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

Successfully merging this pull request may close these issues.

4 participants