Sonatype Nexus

Nexus Repository Manager Setup

Audience: Customer administrators setting up Sonatype Nexus to proxy the ActiveState Curated Catalog.

Prerequisites

  • Sonatype Nexus Repository Manager installed (Community or Pro edition)
  • Version: 3.x recommended (tested with 3.87.0)
  • Admin access to Nexus
  • ActiveState catalog credentials:
    • Repository URL
    • Username (your organization UUID)
    • Password

Step-by-Step Configuration

1. Login to Nexus

Navigate to your Nexus instance (e.g., https://nexus.company.com) and login with admin credentials.

2. Create PyPI Proxy Repository

  1. Click Settings (gear icon) in top navigation
  2. In left sidebar: Repository → Repositories
  3. Click Create repository button
  4. Select recipe: pypi (proxy)

3. Configure Repository Settings

Name:

activestate-platform

(or your preferred name - be descriptive)

Online:

  • ✅ Check “This repository accepts incoming requests”

Storage:

  • Blob store: default (or your preferred blob store)
  • Strict Content Type Validation: ✅ Enabled (recommended)

Proxy:

  • Remote storage:
    https://repository.activestate.com/<YOUR-ORG-ID>/pypi
    

    IMPORTANT:

    • Replace <YOUR-ORG-ID> with your actual organization UUID
    • Do NOT add /simple/ suffix
    • Example: https://repository.activestate.com/b5865a43-1f24-48df-b6f3-8c932c7aae29/pypi

Authentication (expand section):

  • Authentication Type: Username
  • Username: <YOUR-ORG-ID> (same UUID as in URL)
  • Password: (paste password provided by ActiveState)

HTTP request settings:

  • Auto block enabled: ✅ Enabled
  • Blocked: ☐ Unchecked

Negative Cache:

  • Not found cache enabled: ✅ Enabled
  • Not found cache TTL: 1440 (minutes, default is fine)

4. Save Configuration

Click Create repository button at bottom.

5. Verify Repository

  1. In repository list, click on your new repository (activestate-platform)
  2. Click Browse in left sidebar
  3. Should see message about remote repository (packages appear on first access)

6. Test Access

Option A: Via Nexus Web UI

  1. Go to Browse → Browse
  2. Select your repository
  3. After first access, should see package index appear

Option B: Via pip

# Replace with your Nexus URL and credentials
export NEXUS_URL="https://nexus.company.com"
export NEXUS_USER="admin"
export NEXUS_PASS="admin123"

pip install --no-cache-dir --index-url "https://${NEXUS_USER}:${NEXUS_PASS}@nexus.company.com/repository/activestate-platform/simple/" <package-name>

Expected behavior:

  1. Nexus contacts ActiveState repository (may see 401 then 200 in logs - this is normal)
  2. Package metadata retrieved
  3. Package file downloaded and cached
  4. pip installs package successfully

7. Configure pip to Use Nexus (End Users)

Option A: pip config (recommended)

pip config set global.index-url https://<nexus-host>/repository/activestate-platform/simple/
# If using authentication:
pip config set global.index-url https://<user>:<pass>@<nexus-host>/repository/activestate-platform/simple/

Option B: pip.conf / pip.ini

Linux/macOS: ~/.pip/pip.conf or /etc/pip.conf

[global]
index-url = https://<nexus-host>/repository/activestate-platform/simple/

Windows: %APPDATA%\pip\pip.ini

[global]
index-url = https://<nexus-host>/repository/activestate-platform/simple/

Option C: requirements.txt

--index-url https://<nexus-host>/repository/activestate-platform/simple/
package1
package2

Option D: Environment variable

export PIP_INDEX_URL="https://<nexus-host>/repository/activestate-platform/simple/"

Advanced Configuration

Optional: Create PyPI Group Repository

If you need to combine ActiveState catalog with your internal packages:

  1. Create repository → pypi (hosted) for your internal packages
  2. Create repository → pypi (group)
  3. Add members:
    • activestate-platform (proxy)
    • Your internal hosted repository
  4. DO NOT add public PyPI proxy to this group
  5. Configure pip to use group repository URL

Security: Anonymous Access

By default, Nexus may allow anonymous access. Consider:

Disable anonymous:

  1. Security → Anonymous Access
  2. Uncheck “Allow anonymous users to access the server”
  3. Developers must authenticate to Nexus

Create dedicated pip user:

  1. Security → Users → Create user
  2. Grant nx-repository-view-pypi-*-browse and nx-repository-view-pypi-*-read roles
  3. Distribute Nexus credentials (not ActiveState credentials) to developers

Troubleshooting Nexus

Repository Returns 404

Check:

  1. Nexus logs: <nexus-data>/log/nexus.log
  2. Look for HTTP requests to repository.activestate.com
  3. Check for authentication errors (401) or authorization errors (403)

Common causes:

  • Incorrect URL (should not have /simple/ suffix)
  • Wrong credentials
  • Network/firewall blocking outbound HTTPS

Repository Returns 403 from Upstream

Cause: Incorrect ActiveState URL

Fix:

  1. Edit repository
  2. Verify URL: https://repository.activestate.com/<org-id>/pypi
  3. No trailing /simple/

Nexus Shows “Unauthorized” for Repository

Cause: Incorrect credentials

Fix:

  1. Edit repository
  2. Re-enter username (should be your organization UUID)
  3. Re-enter password (get from ActiveState if lost)
  4. Save
  5. Test connection

Nexus Not Caching

Check:

  1. Repository settings → Ensure “Blocked” is unchecked
  2. Repository health check: System → Repository browser → View repository info
  3. Check blob store has space

Verify caching works:

  1. Install package: pip install <package>
  2. Check Nexus: Browse → Components → Select repository
  3. Should see package components listed
  4. Reinstall package (after pip cache purge) - should be faster

Support

For Nexus-specific issues: Consult Sonatype documentation or support.

For ActiveState catalog issues: Contact ActiveState support with:

  • Nexus version
  • Repository configuration (screenshot)
  • Nexus logs showing errors
  • Package name having issues