ARTIFACTORY: PyPI Remote Repository Fails to Download torchvision Due to Host Mismatch (download-r2.pytorch.org)

Products
Frog_Artifactory
Content Type
Use_Case
AuthorFullName__c
Zhang Hailang
articleNumber
000006995
FirstPublishedDate
2026-05-24T09:44:21Z
lastModifiedDate
2026-05-24

ARTIFACTORY: PyPI Remote Repository Fails to Download torchvision Due to Host Mismatch (download-r2.pytorch.org)

Introduction 

When using an Artifactory PyPI remote repository to proxy PyTorch packages, downloading torchvision may fail with errors similar to:
is not of the allowed hosts. Allowed are: [download.pytorch.org]
From logs:
https://download-r2.pytorch.org/... is not of the allowed hosts
This prevents Artifactory from resolving and downloading certain .whl files.


Resolution 

The Correct Configuration of PyPI remote repositories
  1. Remote Repository URL
    https://download-r2.pytorch.org/
    
  2. PyPI Settings
    Registry URL
    https://download.pytorch.org/
    https://download-r2.pytorch.org/
    

     

    Registry Index Location URL Suffix
    whl
Configuration Example

User-added image 


Verifying Results

After applying the configuration above, running the following test to validate:
pip3 install torch==2.8.0+cpu torchvision torchaudio \
--index-url http://admin:XXXXX@localhost:8082/artifactory/api/pypi/manu-pypi2/simple
Observed Behavior
Collecting torch==2.8.0+cpu
  Using cached .../whl/cpu/torch-2.8.0+cpu...

Collecting torchvision
  Downloading .../whl/cu130/torchvision-0.26.0+cu130...
  Downloading .../whl/cu129/torchvision-0.26.0+cu129...
  Downloading .../whl/cu128/torchvision-0.26.0+cu128...
  Downloading .../whl/cu126/torchvision-0.26.0+cu126...
  Downloading .../whl/cpu/torchvision-0.26.0+cpu...

Collecting torchaudio
  Downloading .../whl/cu130/torchaudio-2.11.0+cu130...
The downloading process is successful.