fatal: could not read Username for 'https://github.com': No such device or address
See original GitHub issueBehaviour
It seems breaking changes was introduced to tag v2
this weekend. Locking action to 1b7db3498a1941bc89504b474567da7ddc1341c solves the issue.
Steps to reproduce this issue
- Use
docker/build-push-action@v2
with attached workflow file - Trigger action
Expected behaviour
It should work as before the weekend using the same tag (@v2
)
Actual behaviour
Build fails
Configuration
- Repository URL (if public): private
- Build URL (if public): private
name: "Docker Build/Push and Deploy to k8s"
on:
push:
branches:
- master
pull_request:
branches:
- master
env:
REGISTRY: private.registry.tld
IMAGE_NAME: myrepo
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v1
id: buildx
with:
install: true
- name: Cache Docker layers
uses: actions/cache@v2
with:
path: /tmp/.buildx-cache
key: ${{ runner.os }}-buildx-${{ github.sha }}
restore-keys: |
${{ runner.os }}-buildx-
- uses: actions/checkout@v2
- uses: docker/login-action@v1
with:
registry: ${{ env.REGISTRY }}
username: ${{ secrets.registry_username }}
password: ${{ secrets.registry_password }}
- name: Build and push
uses: docker/build-push-action@v2
with:
# Only push if we are on the master branch
push: ${{ endswith(github.ref, 'master') }}
tags: "${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:${{ github.sha }}"
cache-from: type=local,src=/tmp/.buildx-cache
cache-to: type=local,dest=/tmp/.buildx-cache
Logs
Buildx version: 0.4.2
🏃 Starting build...
/usr/bin/docker buildx build --tag plattform.azurecr.io/myrepo/master:3b9518b1d1444f6307f491a4d8e59692c3df21ea --iidfile /tmp/docker-build-push-AmL3yR/iidfile --cache-from type=local,src=/tmp/.buildx-cache --cache-to type=local,dest=/tmp/.buildx-cache --secret id=GIT_AUTH_TOKEN,src=/tmp/docker-build-push-AmL3yR/tmp-3255-cPRnHGzuxj5J --file ./Dockerfile https://github.com/myorg/myrepo.git#pull/5/merge
time="2020-10-05T08:16:01Z" level=warning msg="invalid non-bool value for BUILDX_NO_DEFAULT_LOAD: "
time="2020-10-05T08:16:01Z" level=warning msg="No output specified for docker-container driver. Build result will only remain in the build cache. To push result image into registry use --push or to load image into docker use --load"
#1 [internal] load git source https://github.com/myorg/myrepo.git#pull/...
#1 0.085 Initialized empty Git repository in /var/lib/buildkit/runc-overlayfs/snapshots/snapshots/1/fs/
#1 0.641 fatal: could not read Username for 'https://github.com': No such device or address
#1 ERROR: failed to fetch remote https://github.com/myorg/myrepo.git: exit status 128
------
> [internal] load git source https://github.com/myorg/myrepo.git#pull/5/merge:
------
failed to solve: rpc error: code = Unknown desc = failed to solve with frontend dockerfile.v0: failed to read dockerfile: failed to load cache key: failed to fetch remote https://github.com/myorg/myrepo.git: exit status 128
Error: The process '/usr/bin/docker' failed with exit code 1
Issue Analytics
- State:
- Created 3 years ago
- Reactions:2
- Comments:7 (4 by maintainers)
Top Results From Across the Web
fatal: could not read Username for 'https://github.com': No such ...
This is an issue with your stored credentials in the system credential cache. You probably have the config variable 'credential.helper' set to ...
Read more >Fatal: Could not read Username for "https://github.com", No ...
Hello! Today I was doing the setup of a git automation inside a Docker container using hub and I ran into something that...
Read more >Fixing could not read Username for 'https://github.com'
But this inscrutable error message comes up. There is a fairly simple fix, especially if you're using an HTTPS URL to access the...
Read more >failed during stage 'preparing repo': error checking for ref: fatal ...
failed during stage 'preparing repo': error checking for ref: fatal: could not read Username for 'https://github.com': No such device or address Anybody ...
Read more >Git push origin master could not read username for http ...
fatal : could not read Username for 'https://github.com': No such file or directory ... git remote set-url origin git@github.com:username/repo.git.
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 FreeTop 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
Top GitHub Comments
this issue is closed but the error still exists on docker/build-push-action@v2 today
Pipeline works correctly using
context: .
as described.