Results 1 to 5 of 5

Thread: use https mirror only in zypper

  1. #1

    Default use https mirror only in zypper

    zypper gets best mirror from its metadata, that's a good thing but, my bandwidth is bad. so, it doesn't really matter. but, I wanna use https mirror only. all of the time zypper uses http mirrors. how can I ask zypper to use https?

  2. #2
    Join Date
    Jun 2008
    Location
    East of Podunk
    Posts
    33,251
    Blog Entries
    15

    Default Re: use https mirror only in zypper

    Quote Originally Posted by super99 View Post
    zypper gets best mirror from its metadata, that's a good thing but, my bandwidth is bad. so, it doesn't really matter. but, I wanna use https mirror only. all of the time zypper uses http mirrors. how can I ask zypper to use https?
    Hi
    I would find a https in your locale to has a good sync priority disable you current download.opensuse.org repos and then duplicate the url's using your mirror...

    For example;

    Code:
    zypper lr -dE
    ....
     2 |download.opensuse.org-oss        | Main Repository (OSS)  | Yes     | (r ) Yes  | Yes     |   99     | rpm-md   | http://download.opensuse.org/tumbleweed/repo/oss/
    ....
    
    zypper mr -d -F -p 101 2
    
    Repository 'download.opensuse.org-oss' has been successfully disabled.
    Autorefresh has been disabled for repository 'download.opensuse.org-oss'.
    Repository 'download.opensuse.org-oss' priority has been set to 101.
    Visit http://download.opensuse.org/tumbleweed/repo/oss/ and click a download link say down in repo data;

    For example;
    http://download.opensuse.org/tumblew....gz.mirrorlist

    I'm in the US So I see a https mirror at https://provo-mirror.opensuse.org/tu...data.it.xml.gz

    I can re-add the mirror repo via;

    Code:
    zypper ar -f -g -n "Main Repository (OSS)" https://provo-mirror.opensuse.org/tumbleweed/repo/oss/ download.opensuse.org-oss-https
    
    Adding repository 'Main Repository (OSS)' ..............................................................................................................................[done]
    Repository 'Main Repository (OSS)' successfully added
    
    URI         : https://provo-mirror.opensuse.org/tumbleweed/repo/oss/
    Enabled     : Yes
    GPG Check   : Yes
    Autorefresh : Yes
    Priority    : 99 (default priority)
    
    Repository priorities are without effect. All enabled repositories share the same priority.
    
    zypper -vvv ref -f
    Then force a refresh and check your output with;

    Code:
    zypper lr -dE
    Cheers Malcolm °¿° SUSE Knowledge Partner (Linux Counter #276890)
    SUSE SLE, openSUSE Leap/Tumbleweed (x86_64) | GNOME DE
    If you find this post helpful and are logged into the web interface,
    please show your appreciation and click on the star below... Thanks!

  3. #3

    Default Re: use https mirror only in zypper

    Hi
    I would find a https in your locale to has a good sync priority disable you current download.opensuse.org repos and then duplicate the url's using your mirror...

    For example...
    can I add/use more than one mirror for same repository?

  4. #4
    Join Date
    Jun 2008
    Location
    East of Podunk
    Posts
    33,251
    Blog Entries
    15

    Default Re: use https mirror only in zypper

    Quote Originally Posted by super99 View Post
    can I add/use more than one mirror for same repository?
    Hi
    Probably not, better to use the download-only option and then when that's done zypper dup.
    Cheers Malcolm °¿° SUSE Knowledge Partner (Linux Counter #276890)
    SUSE SLE, openSUSE Leap/Tumbleweed (x86_64) | GNOME DE
    If you find this post helpful and are logged into the web interface,
    please show your appreciation and click on the star below... Thanks!

  5. #5

    Default Re: use https mirror only in zypper

    Quote Originally Posted by super99 View Post
    zypper gets best mirror from its metadata, that's a good thing but, my bandwidth is bad. so, it doesn't really matter. but, I wanna use https mirror only. all of the time zypper uses http mirrors. how can I ask zypper to use https?
    First, list the URLs of individual repos with zypper lr -u. Check the URI column in the output and find those repos with the basic http:// protocol specified.

    Second, go to/etc/zypp/repos.d, and open individual *.repo files in a text editor corresponding to those repos that you want to change from HTTP to HTTPS.

    Third, change http:// -> https:// in the baseurl= line.

    Last, check the repo is available via HTTPS by running sudo zypper ref <repo>. It will refresh the metadata. If the repo is not accessible via HTTPS, the command will be stuck. All default repos are available in the HTTPS variant however. Personally, I have 14 out of 15 repos which are enabled set to use HTTPS.

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •