password have to be provided when .dockercfg is used and reauth is set to true
Open
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
- Use
Client.loginapi reauthis toTrueand.dockercfgis 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
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- 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