skip to Main Content

I tried login to JFrog artifactory using docker commands:

root@dxc:/home/dxc# echo ${API_Key} | docker login --username 320060162 --password-stdin

But I am facing with the below error:

Error response from daemon: Get "https://registry-1.docker.io/v2/": net/http: request canceled while waiting for connection (Client.Timeout exceeded while awaiting headers)

I tried to check config.json file:

root@dxc:/home/dxc# cd .docker/
root@dxc:/home/dxc/.docker# cat config.json
{
    "auths": {}
}

2

Answers


  1. You can manually set your credentials in the config.json file as below:

    {
        "auths": {
            "<the Docker repository endpoint in Artifactory>": {
                "auth": "<USERNAME>:<PASSWORD> (converted to base 64)",
                "email": "[email protected]"
            }
        }
    }
    
    Login or Signup to reply.
  2. You need to give artifactory endpoint as well in the docker login command.

    echo "your_password" | docker login your_domain.jfrog.io –username "username" –password-stdin

    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search