Hide Forgot
The following fails: #! /usr/bin/python import librepo import time MIRROR="""https://mirrors.fedoraproject.org/metalink?repo=updates-released-f19&arch=x86_64""" DESTDIR="./" URL="""https://bit.ly/18f4dpR""" if __name__ == "__main__": h = librepo.Handle() h.destdir = DESTDIR h.interruptible = True h.repotype = librepo.LR_YUMREPO h.urls = [URL] h.yumdlist = ["primary", "filelists", "prestodelta", "group_gz"] # h.local = True h.perform(librepo.Result()) print(h.urls) print(h.mirrors)
I get: Traceback (most recent call last): File "./main.py", line 20, in <module> h.perform(librepo.Result()) File "/usr/lib64/python2.7/site-packages/librepo/__init__.py", line 916, in perform _librepo.Handle.perform(self, result) librepo.LibrepoException: (19, 'Cannot download repomd.xml: Cannot download repodata/repomd.xml: All mirrors were tried', 'Usable URL not found')
What'd you expect? [~]$ wget https://bit.ly/18f4dpR/repodata/repomd.xml --2013-09-16 11:52:15-- https://bit.ly/18f4dpR/repodata/repomd.xml Resolving bit.ly (bit.ly)... 69.58.188.40, 69.58.188.39 Connecting to bit.ly (bit.ly)|69.58.188.40|:443... connected. HTTP request sent, awaiting response... 301 Moved Permanently Location: https://bitly.com/18f4dpR/repodata/repomd.xml [following] --2013-09-16 11:52:16-- https://bitly.com/18f4dpR/repodata/repomd.xml Resolving bitly.com (bitly.com)... 69.58.188.33, 69.58.188.34 Connecting to bitly.com (bitly.com)|69.58.188.33|:443... connected. HTTP request sent, awaiting response... 404 Not Found 2013-09-16 11:52:16 ERROR 404: Not Found.
Tested on /etc/yum.repos.d/fedora-updates.repo: [updates] name=Fedora $releasever - $basearch - Updates failovermethod=priority baseurl=http://bit.ly/1eFhQlB/pub/fedora/linux/updates/$releasever/$basearch/ #baseurl=http://download.fedoraproject.org/pub/fedora/linux/updates/$releasever/$basearch/ #mirrorlist=https://mirrors.fedoraproject.org/metalink?repo=updates-released-f$releasever&arch=$basearch enabled=1 gpgcheck=1 gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-fedora-$releasever-$basearch (http://bit.ly/1eFhQlB points to http://download.fedoraproject.org) $ yum update ... http://bit.ly/1eFhQlB/pub/fedora/linux/updates/19/x86_64/repodata/repomd.xml: [Errno 14] HTTPS Error 404 - Not Found Trying other mirror. ... = Not a bug
I see, you are right. It's actually not possible to clone a git repo either using a generic shortening service: $ git clone http://bit.ly/186v4AA Cloning into '186v4AA'... fatal: http://bit.ly/186v4AA/info/refs not valid: is this a git repository?