我正在尝试从远程计算机获取 ftp 服务器。该命令未通过'Logging in as anonymous'
。这是我得到的结果。
wget ftp://hgdownload.cse.ucsc.edu/goldenPath/hg19/chromosomes/chr1.fa.gz
--2013-09-29 22:07:53-- ftp://hgdownload.cse.ucsc.edu/goldenPath/hg19/chromosomes/chr1.fa.gz
=> ‘chr1.fa.gz’
Resolving proxy.x.y.z... *.*.*.*
Connecting to proxy.x.y.z|*.*.*.*|:3128... connected.
Logging in as anonymous ...
当我尝试通过 Firefox 从远程计算机访问该网站时,一切正常。我已将 ftp 代理设置为如下形式
export ftp_proxy="ftp://a.user:password@proxy:3128
有人能帮我解决这个问题吗?
谢谢
答案1
您是否尝试过以这种方式设置代理环境?(http:// 而不是 ftp://)
$ export ftp_proxy=http://a.user:[email protected]:3128
您也可以通过其他方式执行此操作,请创建一个包含以下设置的文件 ~/.wgetrc:
http_proxy = http://a.user:[email protected]:3128
ftp_proxy = http://a.user:[email protected]:3128
proxy_user = username
proxy_password = password
use_proxy = on
答案2
该链接对我来说成功起作用了。
$:wgetftp://hgdownload.cse.ucsc.edu/goldenPath/hg19/chromosomes/chr1.fa.gz--2013-09-30
23:34:58-- ftp://hgdownload.cse.ucsc.edu/goldenPath/hg19/chromosomes/chr1.fa.gz
=> `chr1.fa.gz.1'
Resolving hgdownload.cse.ucsc.edu (hgdownload.cse.ucsc.edu)... 128.114.119.163
Connecting to hgdownload.cse.ucsc.edu (hgdownload.cse.ucsc.edu)|128.114.119.163|:21... connected.
Logging in as anonymous ... Logged in!
==> SYST ... done. ==> PWD ... done.
==> TYPE I ... done. ==> CWD (1) /goldenPath/hg19/chromosomes ... done.
==> SIZE chr1.fa.gz ... 73773666
==> PASV ... done. ==> RETR chr1.fa.gz ... done.
Length: 73773666 (70M) (unauthoritative)
3% [=> ] 2,810,568 101K/s eta 10m 57s
在我的/etc/wgetrc
passive_ftp = on
$: wget --version
GNU Wget 1.13.4 built on linux-gnu.
+digest +https +ipv6 +iri +large-file +nls +ntlm +opie +ssl/openssl
Wgetrc:
/etc/wgetrc (system)
Locale: /usr/share/locale
Compile: gcc -DHAVE_CONFIG_H -DSYSTEM_WGETRC="/etc/wgetrc"
-DLOCALEDIR="/usr/share/locale" -I. -I../../src -I../lib
-I../../lib -D_FORTIFY_SOURCE=2 -Iyes/include -g -O2
-fstack-protector --param=ssp-buffer-size=4 -Wformat
-Wformat-security -Werror=format-security -DNO_SSLv2
-D_FILE_OFFSET_BITS=64 -g -Wall
Link: gcc -g -O2 -fstack-protector --param=ssp-buffer-size=4 -Wformat
-Wformat-security -Werror=format-security -DNO_SSLv2
-D_FILE_OFFSET_BITS=64 -g -Wall -Wl,-Bsymbolic-functions
-Wl,-z,relro -Lyes/lib -lssl -lcrypto -lz -ldl -lz -lidn -lrt
ftp-opie.o openssl.o http-ntlm.o ../lib/libgnu.a
操作系统:Ubuntu 12.04.3 LTS 64 bit
我的家庭 LAN 连接到 DHCP 路由器,并通过 WAN 电缆调制解调器使用动态 IP 地址连接到住宅 ISP。
答案3
为了解决这个问题,我设置了以下环境:
#PROXY_URL=http://proxy_usr:proxy_pwd@localhost:3128
PROXY_URL=http://localhost:3128
export HTTP_PROXY=$PROXY_URL
export http_proxy=$PROXY_URL
export HTTPS_PROXY=$PROXY_URL
export https_proxy=$PROXY_URL
export FTP_PROXY=$PROXY_URL
export ftp_proxy=$PROXY_URL
export no_proxy='localhost,127.0.0.1,.yourdomain.com'
alias curl='curl -x $PROXY_URL'
git config --global http.proxy $PROXY_URL
git config --global https.proxy $PROXY_URL