On Tue, Oct 13, 2015 at 9:36 AM, Thierry Goubier <thierry.goub...@gmail.com>
wrote:

>
>
> 2015-10-13 9:29 GMT+02:00 Peter Uhnák <i.uh...@gmail.com>:
>
>> On Tue, Oct 13, 2015 at 8:11 AM, Thierry Goubier <
>> thierry.goub...@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.
>>
>
> This is what I expected. Is that different under Windows?
>

this is the same under windows.


> But the thing is: if I can query for environment variables in Windows,
> then so can the git command as well, which would mean it would pick-up the
> use of ssh-agent, no? Or should I try to manipulate the process
>
> Anyway, I appreciate you're having a look at it. Thanks!
>

I was setting up ssh-agent under windows couple years ago so I don't quite
remember what was the problem exactly,
but iirc the problem was that ssh-agent was setting the variables only
locally (maybe because it didn't understand windows env system).

So the way I forced it to work was that I manually created a permanent
record for SSH_AUTH_SOCK with some predefined path,
and then I was starting the agent with "ssh-agent -a "$Env:SSH_AUTH_SOCK"

this way the agent was bound the the socket specified by the global
variable.

Git itself was then able to correctly read the value from the environment,
so I didn't have to change anything for git, it worked out of the box (as
long as the env was correct).

Interestingly I never needed SSH_AGENT_PID, but maybe git just needs the
socket.

Peter

Reply via email to