cygport upload
Andrew Schulman
schulman.andrew@epa.gov
Sun Mar 29 12:08:56 GMT 2020
> > OK, works. Can lftp or cygport be configured so that lftp does not ask
> > for a password? Or to use sftp instead?
>
> I don't know of any configuration for lftp to turn off that behaviour
> (which is arguably a defect in lftp), but that's probably something you
> could investigate for yourself.
>
> I am not sure why lftp is used instead of sftp, possibly it is
> insufficiently scriptable to do what cygport wants to do.
I wrote the upload command for cygport, with review by Yaakov. Yes, it is harder
to script than you might guess. I originally proposed to offer sftp and lftp
options, but he said to strip it down to just lftp.
The logic is in /usr/share/cygport/lib/pkg_upload.cygpart. If the SSH_KEY
environment variable isn't set, then lftp connects with the connect string
sftp://cygwin@cygwin.com
which will prompt for a password. To use an ssh key, set SSH_KEY equal to the
file name of the key. You can do that in ~/.cygport.conf, for example:
SSH_KEY=~/.ssh/id_dsa
Then if the key is already loaded in a running ssh_agent, or if it's
unencrypted, you shouldn't get a password prompt. Note that SSH_KEY is
documented in the cygport docs.
Good luck!
Andrew
More information about the Cygwin-apps
mailing list