You need to enable JavaScript to run this app.
优惠活动
大模型
产品
解决方案
定价
更多

Docker登录Artifactory仓库遇404及TLS握手超时问题求助

Troubleshooting Docker Login Issues with Artifactory

Let’s work through your two login errors step by step—since you’re already familiar with Docker, we’ll focus on Artifactory-specific configurations that are likely tripping you up.

First Error: 404 Not Found on https://dev.artifactory.com/v2/

This error happens because Artifactory doesn’t expose Docker’s v2 API directly at the root domain by default. Docker repositories in Artifactory require you to target the specific repository key in your request path.

Fix Steps:

  1. Verify your Artifactory Docker Repository Key
    Log into your Artifactory UI, navigate to Repositories > Local/Remote/Virtual, and find the Docker repository you want to use. Note its Repository Key (e.g., docker-local for a local repo, docker-remote for a remote, or docker-virtual for a virtual repo).

  2. Adjust your Nginx Proxy Configuration
    Artifactory needs specific Nginx location blocks to route Docker requests correctly. Replace the generic config you might have with something like this (swap docker-local with your actual repository key):

    # Route direct repository requests
    location /docker-local/ {
        proxy_pass http://localhost:8081/artifactory/docker-local/;
        proxy_set_header Host $host;
        proxy_set_header X-Real-IP $remote_addr;
        proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
        proxy_set_header X-Forwarded-Proto $scheme;
    }
    
    # Route Docker v2 API requests
    location /v2/ {
        proxy_pass http://localhost:8081/artifactory/api/docker/docker-local/v2/;
        proxy_set_header Host $host;
        proxy_set_header X-Real-IP $remote_addr;
        proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
        proxy_set_header X-Forwarded-Proto $scheme;
    }
    

    After updating, restart Nginx to apply changes.

  3. Test the Login with the Correct Context
    Now try logging in without specifying the /v2/ path—Docker will automatically use the correct API path if your proxy is set up right:

    docker login dev.artifactory.com
    

Second Error: TLS Handshake Timeout on port 80

When you run docker login dev.artifactory.com:80, Docker defaults to using HTTPS to connect to port 80—but port 80 is typically for unencrypted HTTP traffic. This mismatch causes the TLS handshake timeout.

Fix Options:

  1. Force HTTP for the login
    If your Nginx is running HTTP on port 80, use the --http flag to tell Docker not to use TLS:

    docker login --http dev.artifactory.com:80
    
  2. Switch to HTTPS (Recommended)
    For production use, set up HTTPS on port 443 in Nginx with a valid SSL certificate (self-signed works for testing, but use a trusted cert for production). Once configured, you can log in normally without specifying a port:

    docker login dev.artifactory.com
    

Additional Checks to Rule Out Other Issues

  • Confirm Artifactory is running: Run curl http://localhost:8081/artifactory/api/system/ping on the Artifactory server—you should get a response of ok.
  • Check network connectivity: From your Docker client machine, test if you can reach the Artifactory server with ping dev.artifactory.com and telnet dev.artifactory.com 80 (or 443). If these fail, you might have a firewall or DNS issue to resolve.
  • Verify user permissions: Ensure the Artifactory user you’re logging in with has Read/Deploy permissions for the target Docker repository. You can check this in the Artifactory UI under Admin > Users > [Your User] > Permissions.

内容的提问来源于stack exchange,提问作者arjunkumarselvamani

相关产品推荐
方舟 Agent Plan

超全模态模型 × Harness 升级,最新支持 Deepseek-V4.1-Flash、GLM-5.3 系列、Doubao-Seedream-5.0-pro、Kimi-K3 (部分), 限时 9.9 元起

最近更新时间:2026.05.27 10:03:57