From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from ciao.gmane.io (ciao.gmane.io [159.69.161.202]) by sourceware.org (Postfix) with ESMTPS id 4E850385B835 for ; Sun, 29 Mar 2020 12:09:04 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org 4E850385B835 Received: from list by ciao.gmane.io with local (Exim 4.92) (envelope-from ) id 1jIWkP-000O9s-Pv for cygwin-apps@cygwin.com; Sun, 29 Mar 2020 14:09:01 +0200 X-Injected-Via-Gmane: http://gmane.org/ To: cygwin-apps@cygwin.com From: Andrew Schulman Subject: Re: cygport upload Date: Sun, 29 Mar 2020 08:08:56 -0400 Message-ID: References: <3b855b82-cf0b-496c-c7b0-beb23c29b966@towo.net> <8c872bcb-3541-4016-094e-df7b8231513c@towo.net> <8c872bcb-3541-4016-094e-df7b8231513c-JHPtuYzOr/0@public.gmane.org> <555ac0bb-0984-f320-c240-df9e165ca062@dronecode.org.uk> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Newsreader: Forte Agent 4.2/32.1118 X-Archive: encrypt X-Spam-Status: No, score=-2.0 required=5.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS, KAM_DMARC_STATUS, SPF_HELO_NONE, SPF_PASS, TXREP autolearn=no autolearn_force=no version=3.4.2 X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on server2.sourceware.org X-BeenThere: cygwin-apps@cygwin.com X-Mailman-Version: 2.1.29 Precedence: list List-Id: Cygwin package maintainer discussion list List-Unsubscribe: , List-Archive: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 29 Mar 2020 12:09:06 -0000 > > 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