You are not logged in.
I'm looking for the way to add password-protected repository to pacman list of repos. For example, my repository database resides on HTTPS/FTP server with password-based access (private FTP or AuthBasic apache share). What is the best practice to allow access for pacman to such restricted sources? The most straightforward solution is to embed login:password pair into the URI inside pacman.conf, but it doesn't seems safe. May be there are any advanced ways to store credentials for authentication?
Last edited by dviktor (2019-03-28 17:54:41)
Offline
You should be able to do this by using entries in /root/.curlrc and/or /root/.netrc.
https://ec.haxx.se/cmdline-passwords.html
Offline
Thank you a lot! Both .netrc and .curlrc (proper XferCommand is required in pacman.conf) works great. Solved
Offline
The only problem is with pkgfile - seems like it doesn't honor neither .curlrc nor .netrc. Setting up XferCommand in pacman.conf doesn't solve this problem
Last edited by dviktor (2019-03-28 19:42:06)
Offline
Are you running pkgfile as a regular user? You may need to put the credentials in ~ as well.
Offline
No, I'm running it with sudo:
[viktor@desolve-lab ~]$ sudo pkgfile --update
[sudo] password for viktor:
:: Updating 5 repos...
multilib is up to date
core is up to date
extra is up to date
community is up to date
warning: download failed: ******* [error 401]
error: failed to update repo: apocalypse
Offline
pkgfile is most likely not setting CURLOPT_NETRC to honor netrc settings. You could submit a feature request. In the meantime, you should be able to replace most/all of pkgfile with the FILE (-F) option for pacman
pacman -Fy
pacman -Fo ...
Last edited by progandy (2019-03-28 21:01:12)
| alias CUTF='LANG=en_XX.UTF-8@POSIX ' |
Offline
Filed an issue. Will see which solution could be applied.
EDIT: fixed and works great
Last edited by dviktor (2019-04-01 09:00:15)
Offline