Articles of curl

curl通过https请求成功,wget不会

当我从命令行运行curl curl "https://example.com" 它立即成功,返回请求的结果。 当我运行相同的wget命令 wget https://example.com 它最终超时与“无法build立SSL连接”。 没有任何具体的错误信息。 它连接,但不能做SSL握手。 我尝试了–no-check-certificate但没有任何区别 – 它似乎是超时相关的。 然而: wget http://example.com 工作正常(HTTP与HTTPS)。 这也影响了PHP的“ file() ”方法调用。 我的问题是,什么会导致curl成功检索一个页面(对于我们的域名中的所有网站),而不是wget或php解释器? 这是周末的一个新问题,服务器之前是好的。 (操作系统是Red Hat Enterprise Linux 6.4)

Brew安装imagemagickcurl失败

试图在OS X Mountain Lion上通过brew安装imagemagick时,出现以下错误。 这似乎是一个curl错误 – 因此,为什么它在SF而不是另一个堆栈交换站点。 brew install imagemagick ==> Installing imagemagick dependency: pkg-config ==> Downloading http://pkgconfig.freedesktop.org/releases/pkg-config-0.27.tar.gz curl: (7) couldn't connect to host Error: Download failed: http://pkgconfig.freedesktop.org/releases/pkg-config-0.27.tar.gz 运行brew install imagemagick命令时可以select另一个下载位置吗? 这是一个已知的问题,我寻找类似的问题,但似乎没有一样的。

multithreading下载与shell脚本

比方说,我有一个文件有很多url,我想要使用任意数量的进程并行下载它们。 我怎样才能用bash做到这一点?

在Ubuntu上安装Composer

我正在尝试使用以下命令安装作曲者: sudo curl -s https://getcomposer.org/installer | php 我得到这个错误: All settings correct for using Composer Downloading… Download failed: failed to open stream: Permission denied Downloading… Download failed: failed to open stream: Permission denied Downloading… Download failed: failed to open stream: Permission denied The download failed repeatedly, aborting. 我不知道为什么? 你有好主意吗? 我尝试谷歌,但没有。

curl和wget尝试一个ipv6连接

在我的专用服务器(由OVH托pipe)上运行全新安装的Ubuntu 14.04,curl和wget需要大约10秒来完成一个简单的请求。 $ curl -v google.com * Rebuilt URL to: google.com/ * Hostname was NOT found in DNS cache 只有在10秒后它才会返回一些东西。 所以我决定在这个上运行strace : write(2, "Hostname was NOT found in DNS ca"…, 36) = 36 socket(PF_INET6, SOCK_DGRAM, IPPROTO_IP) = 3 close(3) = 0 mmap(NULL, 8392704, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS|MAP_STACK, -1, 0) = 0x7f0a24fb8000 mprotect(0x7f0a24fb8000, 4096, PROT_NONE) = 0 clone(child_stack=0x7f0a257b7f70, […]

在Ubuntu 11.10中安装libcurl4-gnutls-dev或libcurl4-nss-dev有什么区别?

对于我在ubuntu服务器上安装的软件,它需要curl deb包。 当我尝试安装libcurl4-dev它说这是一个虚拟包,我需要安装libcurl4-gnutls-dev或libcurl4-nss-dev 。 安装一个或另一个有什么区别? PS:安装libcurl3或libcurl4有什么大的区别?

Ubuntu 14.04上git(在github上)的SSLvalidation错误

我试图克隆刚刚完全开源的primefaces库,并遇到了一些麻烦。 试图git clone仓库git clone产生一个SSL错误: wug@wugputer:/src/test$ git clone https://github.com/atom/atom.git Cloning into atom… error: SSL certificate problem, verify that the CA cert is OK. Details: error:14090086:SSL routines:SSL3_GET_SERVER_CERTIFICATE:certificate verify failed while accessing https://github.com/atom/atom.git/info/refs fatal: HTTP request failed 谷歌search已经表明,这是一个失败的CURL调用,并有一个环境variables,我可以设置获得更多的信息,但没有显示任何特别有用的东西: wug@wugputer:/src/test$ GIT_CURL_VERBOSE=1 git clone https://github.com/atom/atom.git Cloning into atom… * Couldn't find host github.com in the .netrc file; using defaults * […]

CURL,WGET的替代品

有谁知道任何curl和wget的替代品? 我正在寻找的关键function要求是能够对已知的URL执行HTTPS GET请求。 我正在寻找替代品的原因是,我试图从目前没有安装wget或curl的服务器执行连接testing。 有关的服务器是在严格的更改控制下,所以安装新的软件是一个禁忌。 安装在服务器上的操作系统是AIX。

为什么DNS查找不尊重/etc/nsswitch.conf&/etc/host.conf?

即使存在于/ etc / hosts中,也存在从DNS查找主机名的问题。 我有以下configuration: /etc/host.conf档案: order hosts,bind /etc/nsswitch.conf中: hosts: files dns 在/etc/resolv.conf: nameserver <nameserver one> nameserver <nameserver two> 在主机上运行的应用程序会产生一些内部和外部的API请求。 从tcpdump,我看到一些在/ etc / hosts中列出的内部服务主机名的DNS查询。 我正在使用的tcpdump命令是: tcpdump -tqAlU -s0 port 53 and host <nameserver one> 在转储我看到像下面这样的请求: IP 10.0.80.11.domain > app004-private.51308: UDP, length 102 E…I2..>… .P. ………I.1E…:…Q.. localhost………… [email protected].. IP app004-private.33828 > 10.0.80.11.domain: UDP, length 39 E..Ca.@[email protected]. […]

为什么服务器禁用SSLv3后git停止工作?

像大多数其他人一样,我们的存储库服务器需要尽快禁用SSLv3(和v2)。 然而,这样做似乎打破了我们的客户端 – 至less在RHEL5上(从我的FreeBSD桌面连接工作正常)。 即使最近的git(2.1.2)也失败了,并且从供应商升级OpenSSL库到最新的版本都没有帮助。 不过 ! 同样的git-client在github.com上工作得很好 – 而且github.com已经禁用了SSLv3。 通过试验和错误,我设置了我们的服务器(Apache)SSLconfiguration以匹配github的configuration: SSLProtocol ALL -SSLv2 -SSLv3 SSLHonorCipherOrder On SSLCipherSuite "AES128-SHA AES256-SHA RC4-SHA" 通过运行sslscan对我们的服务器和github,我得到相同的密码列表接受和拒绝。 但git继续失败: % git clone https://git.example.net/git/puppet-hiera Cloning into 'puppet-hiera'… * Couldn't find host git.example.net in the .netrc file, using defaults * About to connect() to git.example.net port 443 * Trying 10.89.8.27… * connected * […]