public inbox for cygwin@cygwin.com
 help / color / mirror / Atom feed
* WinCVS via Corinna's SSH works & "Exporting" of env vars.
@ 2000-08-07  9:07 C. R. Oldham
  2000-08-22  7:17 ` C. R. Oldham
  0 siblings, 1 reply; 3+ messages in thread
From: C. R. Oldham @ 2000-08-07  9:07 UTC (permalink / raw)
  To: Cygwin Mailing List

Greetings,

I was just successful in using WinCVS to talk to a CVS server via
Corinna's OpenSSH port.  I also was employing ssh-agent, so that was
good news.  I had previously posted that I
was having trouble making that work.  Note that you must use 1.1.4 of
the cygwin DLL and set the env var CYGWIN to contain "binmode" or else
ssh converts cr/lfs and WinCVS does not understand the result.

Now, the second problem.  Ssh-agent is particularly cumbersome to use
since it is hard to get all processes on Windows to be a descendant of
it.  It appears, however, that there must be some way to export the
relevant environment variables SSH_AGENT_PID/SSH_AGENT_SOCK, etc, out to
the OS (e.g. they would be visible in the System control panel).  I
figure this must be possible since MS Developer Studio does this when it
installs, and it does not require a reboot.  Is there an easy way?

My plan was to write a batch file or somesuch that would start
ssh-agent, add the relevant identity, get the passphrase, and export the
variables to the right process space.  Then upon death of ssh-agent, the
batch file would terminate and clean up the variables.

--
   / Charles (C. R.) Oldham      | NCA Commission on Schools   \
  / Director of Technology       | Arizona State University     \
 / "cro at nca dot asu dot edu"  | V:480/965-8703 F:480/965-9423 \
 |                   http://www.nca.asu.edu/                     |



--
Want to unsubscribe from this list?
Send a message to cygwin-unsubscribe@sourceware.cygnus.com

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: WinCVS via Corinna's SSH works & "Exporting" of env vars.
  2000-08-07  9:07 WinCVS via Corinna's SSH works & "Exporting" of env vars C. R. Oldham
@ 2000-08-22  7:17 ` C. R. Oldham
  2000-08-22 14:06   ` Jason Tishler
  0 siblings, 1 reply; 3+ messages in thread
From: C. R. Oldham @ 2000-08-22  7:17 UTC (permalink / raw)
  To: Cygwin Mailing List

[-- Attachment #1: Type: text/plain, Size: 1147 bytes --]

"C. R. Oldham" wrote:

> I was just successful in using WinCVS to talk to a CVS server via
> Corinna's OpenSSH port.

[...]

> Ssh-agent is particularly cumbersome to use
> since it is hard to get all processes on Windows to be a descendant of
> it.  It appears, however, that there must be some way to export the
> relevant environment variables SSH_AGENT_PID/SSH_AGENT_SOCK, etc, out to
> the OS

I just wanted to followup on this for everyone.  I did find a small utility
that will change settings of master environment variables on NT.  I was able
to write a bash script that starts ssh-agent and "exports" the variable
values out to the NT master environment so all new processes see them.  This
works pretty slick.

The utility program is called "setx.exe" and comes in the NT resource kit.

After everything is setup WinCVS works like a champ!

Attached is the script.


--
   / Charles (C. R.) Oldham      | NCA Commission on Schools   \
  / Director of Technology       | Arizona State University     \
 / "cro at nca dot asu dot edu"  | V:480/965-8703 F:480/965-9423 \
 |                   http://www.nca.asu.edu/                     |


[-- Attachment #2: startagent.sh --]
[-- Type: text/x-shellscript, Size: 356 bytes --]

#!/bin/sh

eval `/usr/local/bin/ssh-agent`
/cygdrive/c/bin/setx.exe SSH_AGENT_PID $SSH_AGENT_PID
/cygdrive/c/bin/setx.exe SSH_AUTH_SOCK $SSH_AUTH_SOCK
/usr/local/bin/ssh-add
echo "Agent is running. Press return to kill ssh-agent."
read
eval `/usr/local/bin/ssh-agent -k`
/cygdrive/c/bin/setx.exe SSH_AGENT_PID ""
/cygdrive/c/bin/setx.exe SSH_AUTH_SOCK ""


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: WinCVS via Corinna's SSH works & "Exporting" of env vars.
  2000-08-22  7:17 ` C. R. Oldham
@ 2000-08-22 14:06   ` Jason Tishler
  0 siblings, 0 replies; 3+ messages in thread
From: Jason Tishler @ 2000-08-22 14:06 UTC (permalink / raw)
  To: Cygwin Mailing List

Charles,

On Tue, Aug 22, 2000 at 07:22:07AM -0700, C. R. Oldham wrote:
> The utility program is called "setx.exe" and comes in the NT resource kit.

FYI, the NT resource kit and hence setx.exe is not freely available.

I was originally using setx.exe in a similar way to how you were using it.
In order to eliminate licensing issues, I decided to write the attached
program, sndwsc, and use it in conjunction with regtool instead.  sndwsc
compiles easily with gcc or MSVC.

Hopefully, those who do not have the NT resource kit and need the
functionality of setx.exe will find this post useful.

Jason

-- 
Jason Tishler
Director, Software Engineering       Phone: +1 (732) 264-8770 x235
Dot Hill Systems Corporation         Fax:   +1 (732) 264-8798
82 Bethany Road, Suite 7             Email: Jason.Tishler@dothill.com
Hazlet, NJ 07730 USA                 WWW:   http://www.dothill.com

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2000-08-22 14:06 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2000-08-07  9:07 WinCVS via Corinna's SSH works & "Exporting" of env vars C. R. Oldham
2000-08-22  7:17 ` C. R. Oldham
2000-08-22 14:06   ` Jason Tishler

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).