You are not logged in.
I'm working behind a proxy, and I configured it by setting http_proxy, https_proxy, rsync_proxy and ftp_proxy environment variables. Almost everything works (pacman, web browsers, git+https, wget, curl...) but I cannot get yaourt and pacaur to work:
jalon ~ $ yaourt -Ss vim-youcompleteme-git
curl error: Failure when receiving data from the peer
jalon ~ $ pacaur -Ss vim-youcompleteme-git
error: [vim-youcompleteme-git]: Failure when receiving data from the peer
jalon ~ $ yaourt -Ss kicad
community/kicad 4.0.4-2
Electronic schematic and printed circuit board (PCB) design tools
community/kicad-library 4.0.4-1
Kicad component and footprint libraries
community/kicad-library-3d 4.0.4-1
Kicad 3D render model libraries
curl error: Failure when receiving data from the peer
jalon ~ $ pacaur -Ss kicad
community/kicad 4.0.4-2
Electronic schematic and printed circuit board (PCB) design tools
community/kicad-library 4.0.4-1
Kicad component and footprint libraries
community/kicad-library-3d 4.0.4-1
Kicad 3D render model libraries
error: [kicad]: Failure when receiving data from the peer
jalon ~ $
When I search for a package, it looks like results obtained from pacman database are properly displayed, but AUR search fails. I don't know how pacaur works under the hood, but it looks like yaourt uses curl, what make the problem a bit strange, because as I stated before, curl is working perfect on my system. I can also access AUR on the web browser, to confirm it's not blocked by the proxy.
How can I know if the problem is because of yaourt/pacaur not honoring proxy settings, or because somehow the proxy is blocking requests?
Offline
Pacaur indeed uses curl to access the AUR RPC interface. The search feature is entirely provided by cower, so you might also want to check that it works correctly (it also uses curl).
Offline
It looks like cower is not working, even though curl properly gets the HTTP response to the query when called from the command line:
Maybe cower "eats" proxy settings?
jalon ~ $ cower --debug -v -s vim-youcompleteme-git
debug: adding target: vim-youcompleteme-git
debug: initializing alpm
debug: registering alpm db: core
debug: registering alpm db: extra
debug: registering alpm db: community
debug: searching with fragment 'vim-youcompleteme-git' from 'vim-youcompleteme-git'
debug: [vim-youcompleteme-git]: curl_easy_perform https://aur.archlinux.org/rpc.php?v=5&type=search&arg=vim-youcompleteme-git&by=name-desc
error: [vim-youcompleteme-git]: Failure when receiving data from the peer
debug: releasing curl
debug: releasing alpm
jalon ~ $ curl "https://aur.archlinux.org/rpc.php?v=5&type=search&arg=vim-youcompleteme-git&by=name-desc"
{"version":5,"type":"search","resultcount":1,"results":[{"ID":341349,"Name":"vim-youcompleteme-git","PackageBaseID":66973,"PackageBase":"vim-youcompleteme-git","Version":"28.972eecb-1","Description":"A code-completion engine for Vim","URL":"http:\/\/valloric.github.com\/YouCompleteMe\/","NumVotes":112,"Popularity":4.229034,"OutOfDate":null,"Maintainer":"tata","FirstSubmitted":1360099972,"LastModified":1474727083,"URLPath":"\/cgit\/aur.git\/snapshot\/vim-youcompleteme-git.tar.gz"}]}
Could it be cower "eating" proxy settings?
Offline
Is it behind your own local proxy or a vpn proxy (such as tor)?
I may have to CONSOLE you about your usage of ridiculously easy graphical interfaces...
Look ma, no mouse.
Offline
It's behind a corporate proxy.
Offline
Bump
Offline
I have stopped investigating this issue, but it's likely related to this other problem I also had with pacman. I solved it by configuring pacman to use an external program (curl/wget) to download packages. I don't know if something similar can be done with yaourt, a quick look to the config file does not show any options to specify an external downloader.
Offline
Which is okay, since they are both shell scripts invoking curl anyway. So as long as curl natively works, there should be no problems. If curl doesn't natively work, then as long as you can pass options to curl to get it to work, you can also put those options in ~/.curlrc so you can fix "it" for more than just AUR helpers (and pacman, if you use it as an external downloader).
Last edited by eschwartz (2016-12-01 10:44:24)
Managing AUR repos The Right Way -- aurpublish (now a standalone tool)
Offline
I don't know if I understood your suggestion. The problem I had is that pacman (and maybe also yaourt) set a custom User-Agent. So curl works with default User-Agent string, but fails when using other strings. I'm not sure if options set in .curlrc can override the ones directly set by pacman/yaourt. I might give it a try, but I have not high hopes in it.
Offline
Actually, forget what I said before. package-query (which yaourt uses for everything except actual tarball downloads, in which case it uses /usr/bin/curl directly) sets a user-agent of "package-query/$version". cower (which pacaur uses for everything but scraping the RPC json interface) may do similar.
I am pretty sure ~/.curlrc doesn't affect libcurl, just /usr/bin/curl.
The problem is deeper than yaourt or pacaur though.
Managing AUR repos The Right Way -- aurpublish (now a standalone tool)
Offline
Do you still have the problem? I installed pacaur today in a virtual machine behind a proxy, and setting the environment as in the "Proxy settings" wiki solved the problem (i.e., declaring only http_proxy and the rest based on $http_proxy). I could use pacaur afterwards.
Offline
Do you still have the problem? I installed pacaur today in a virtual machine behind a proxy, and setting the environment as in the "Proxy settings" wiki solved the problem (i.e., declaring only http_proxy and the rest based on $http_proxy). I could use pacaur afterwards.
Unfortunately I still have the problem. It looks like my proxy is blocking HTTP requests having "strange" user-agents. Maybe your proxy is less strict. I have fired Wireshark to peek what exactly is yaourt doing, and as I suspected, user-agent is not set to curl or any other "well known" user-agent:
CONNECT aur.archlinux.org:443 HTTP/1.1
Host: aur.archlinux.org:443
User-Agent: package-query/1.8
Proxy-Connection: Keep-Alive
I need to spoof the User-Agent to be something like "curl", or I will not be able to traverse my proxy.
Last edited by doragasu (2016-12-07 08:07:57)
Offline