简体   繁体   English

在Windows上使用lftp的git ftp push

[英]git ftp push with lftp on windows

I am pretty fed up with own inability to get this running, sorry. 抱歉,我非常烦恼自己无法运行此命令。

git and git-ftp are installed ok, git ftp push works fine(albeit only with plain ftp, not sftp). 好的git和git-ftp安装好了,git ftp push可以正常工作(尽管仅适用于普通ftp,而不是sftp)。 I am trying to get git ftp pull/download to work since there are situations where ftp content is changed directly. 我试图让git ftp pull / download正常工作,因为在某些情况下ftp内容会直接更改。

The lftp is needed for that so got LFTP for Windows from Nwgat. 为此需要lftp,因此可以从Nwgat获得Windows的LFTP。 It is a standalone, I put it into program files/lftp (bin and etc folders), set env. 它是独立的,我将其放入程序文件/ lftp(bin和etc文件夹)中,设置env。 path, lftp runs now from commandline. 路径,lftp现在可以从命令行运行。

git ftp pull produces following error with first lftp command "cd" git ftp pull与第一个lftp命令“ cd”产生以下错误

Fatal error: Certificate verification: unable to get local issuer certificate

I can use lftp directly with success lftp ftp://username@ftp.server.com then set commands 我可以直接将lftp成功使用lftp ftp://username@ftp.server.com然后设置命令

set ssl:verify-certificate no 设置ssl:verify-certificate否

set ftp:ssl-allow no; 设置ftp:ssl-allow no;

but when git calls lftp something is wrong and a certificate is in play, I assume forced SSL connection. 但是当git调用lftp时,出现了问题,并且证书在起作用,我认为是强制SSL连接。 So I added 所以我加了

set ssl:verify-certificate no 设置ssl:verify-certificate否

set ftp:ssl-allow no; 设置ftp:ssl-allow no;

to C:\\Program Files\\lftp\\etc\\lftp.conf 到C:\\ Program Files \\ lftp \\ etc \\ lftp.conf

However calling "set" in lftp does not show any of the config parameters, so I assume lftp from git-ftp does not respect the ssl settings... 但是,在lftp中调用“ set”不会显示任何配置参数,因此我假设来自git-ftp的lftp不遵守ssl设置...

Any ideas before I start writing my own shell script instead of git ftp pull? 在开始编写自己的shell脚本而不是git ftp pull之前有什么想法吗? :) :)

EDIT: It seems the config file is ignored in lftp, no matter if it is called from git or directly. 编辑:无论是从git还是直接调用,似乎在lftp中都会忽略该配置文件。 Where the hell is lftp looking for config file? lftp在哪里寻找配置文件? Tried users/user/.lftprc, failed. 尝试用户/用户/.lftprc,失败。

thanks Alexander 谢谢亚历山大

so I found out I had a messed up installation of git-ftp also messed up install of cygwin. 所以我发现我搞砸了git-ftp的安装,也搞砸了cygwin的安装。 When I reinstalled all from scratch, everything works well :) 当我从头开始重新安装所有组件时,一切正常:)

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM