[Pharo-users] [ANN] Windows support for GitFileTree

Hernán Morales Durand hernan.morales at gmail.com
Tue Oct 13 11:24:13 EDT 2015


2015-10-13 4:29 GMT-03:00 Peter Uhnák <i.uhnak at gmail.com>:

> On Tue, Oct 13, 2015 at 8:11 AM, Thierry Goubier <
> thierry.goubier at gmail.com> wrote:
>
>> Hi Hernàn,
>>
>> I'm not familiar with the use of ssh-agent. Could it interfere with
>> someone using his own keys (i.e. without ssh-agent)? Would this be
>> necessary for linux or mac use of ssh-agent, or is ssh / git correctly done
>> on those platforms to query ssh-agent on its own if it is already running?
>>
>
> I'm using ssh-agent on both windows and linux, and having aforementioned
> variables (SSH_AGENT_PID, SSH_AUTH_SOCK) in the environment is enough for
> git to automatically use it, no need to prefix it.
>
>
I don't know if I get what you mean with prefix it. But the "set
SSH_AGENT_PID=...." is done because the cmd.exe launched by ProcessWrapper
does not detect SSH variables from other environment/term.

I think many platforms (MinGW/MSYS/Cygwin) use something like this to
launch ssh-agent for every term:

echo "#!/bin/bash \
eval `ssh-agent -s` \
ssh-add" >> ~/.bashrc



> In any case I have notes about the implementation:
>
> 1. it assumes that it runs only on windows (it looks like this should be
> generic code)
> 2. it assumes that ssh-agent will be always installed in a specific path,
> it should rely on PATH instead
>

Yes, some time ago I sent some FileSystem extensions to locate path
binaries. I don't know if they are still around but it could be used.


> 3: Windows has its own system for global env variables, so why not use
> that?
> So instead of doing some process lookups you simply get
> $Env:SSH_AUTH_SOCK" (well, I use powershell... but the bat version is I
> think %SSH_AUTH_SOCK%)
>

I guess they could be used, but Git Bash is a MSYS command, so the
environment variables need to be exported.

Hernán


> Peter
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.pharo.org/pipermail/pharo-users_lists.pharo.org/attachments/20151013/f3050c74/attachment.html>


More information about the Pharo-users mailing list