question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

no auth credentials when wrapping docker push cmd

See original GitHub issue

After 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:closed
  • Created 5 years ago
  • Comments:5 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
bitprophetcommented, Jun 28, 2018

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 add replace_env=False to what you have now) and see if that makes it work?

0reactions
bitprophetcommented, Jun 28, 2018

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 to replace_env=False.

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found