docker / docker/docker-py

password have to be provided when .dockercfg is used and reauth is set to true

Open
#689 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Python
Stars
7.2k
Forks
1.7k
Avg merge
13d 8h
Merged PRs (30d)
2

Description

password have to be provided when .dockercfg is used and reauth is set to True

  1. Use Client.login api
  2. reauth is to True and .dockercfg is used

You will get the following exception if password argument should be explicitly provided.

  File "/root/ci_infra_pyenv/py27/lib/python2.7/site-packages/docker/client.py", line 544, in login
    return self._result(response, json=True)
  File "/root/ci_infra_pyenv/py27/lib/python2.7/site-packages/docker/clientbase.py", line 108, in _result
    self._raise_for_status(response)
  File "/root/ci_infra_pyenv/py27/lib/python2.7/site-packages/docker/clientbase.py", line 104, in _raise_for_status
    raise errors.APIError(e, response, explanation=explanation)
docker.errors.APIError: 401 Client Error: Unauthorized ("Wrong login/password, please try again")

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reproducing the Client.login call with reauth=True and credentials from .dockercfg. Read docker/client.py around line 544 and docker/clientbase.py around lines 104-108 to trace the failed response. Done means login no longer requires an explicitly supplied password in this configuration, with coverage for the reported scenario.

Written by the indexing model from the issue text.

Assessment

Tech stack
docker, python
Domain
api, authentication, backend
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.