no auth credentials when wrapping docker push cmd
See original GitHub issueAfter migrating to Fabric 2.0 my simple fab command to run a docker push doesn’t work anymore. For some reason, the shell doesn’t know I’m logged in. When I run the shell command outside Fabric it works fine. Any ideas what is going on?
@task
def push(c, tag):
c.run(f'docker push docker.company.com/app:{tag}')
The push refers to repository [docker.company.com/app]
f76a30813b1d: Preparing
1ead8c68efa3: Preparing
17b534c85a5f: Preparing
53d8d2a2e6ab: Preparing
0b7cd459baf0: Preparing
ddd403bcae47: Preparing
1f127cc5b31e: Preparing
b09178215597: Preparing
62345e64388b: Preparing
1f127cc5b31e: Waiting
ddd403bcae47: Waiting
62345e64388b: Waiting
b09178215597: Waiting
014cf8bfcb2d: Preparing
014cf8bfcb2d: Waiting
no basic auth credentials
Issue Analytics
- State:
- Created 5 years ago
- Comments:5 (3 by maintainers)
Top Results From Across the Web
Docker push to ECR failing with "no basic auth credentials"
Hi guys, I'm pretty new to Docker and AWS's ECR however, I'm stuck at pushing a Docker image to a repository I've created...
Read more >Can't push image to Amazon ECR - fails with "no basic auth ...
To authenticate and authorize Docker push and pull requests follow this step. Check whether aws credentials properly configured or not. To configure AWS...
Read more >Troubleshooting errors with Docker commands when using ...
HTTP 403 Errors or "no basic auth credentials" error when pushing to repository. There are times when you may receive an HTTP 403...
Read more >Document how to initialize docker-credentials-pass · Issue #102
Hi,. the README currently says: "pass needs to be configured for docker-credential-pass to work properly. It must be initialized with a gpg2 ...
Read more >no basic auth for ECR push causing failure
I have a java service that I am trying to create a pipeline to build, create a docker image, tag and push to...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Wondering if this is another permutation of #1752 - if docker is relying on env vars for its config or auth, that would cause this. Please try changing your v2 code to
c.run(f"docker ...", replace_env=False)
(i.e. just addreplace_env=False
to what you have now) and see if that makes it work?Thanks! I’m going to close this as a sub-case of that linked issue, please follow it if interested. Once fixed this issue should effectively go away -
Context.run()
/Connection.local()
will default toreplace_env=False
.