Skip to content

Git auth token not taken into account since Buildx v0.32.0 #1477

@dn-itechcraft

Description

@dn-itechcraft

Contributing guidelines

I've found a bug, and:

  • The documentation does not mention anything about my problem
  • There are no open or closed issues that are related to my problem

Description

build-push-action not working without context and file

Expected behaviour

working without context in file

Actual behaviour

error when i noy used context and file

Repository URL

No response

Workflow run URL

No response

YAML workflow

- name: Set up Docker Buildx
      uses: docker/setup-buildx-action@v3
    - name: Build and push by branch
      if: ${{ github.ref_type == 'branch' }}
      uses: docker/build-push-action@v6
      with:
        platforms: linux/amd64
        target: api_php_dev
        tags: |
          ${{ env.ECR_REGISTRY }}/${{ env.ECR_REPO }}:${{ env.SHORT_IMAGE_TAG }}-${{ env.SHORT_SHA }}
          ${{ env.ECR_REGISTRY }}/${{ env.ECR_REPO }}:${{ env.SHORT_IMAGE_TAG }}
        push: true
        no-cache: true
        build-args: |
          composer_token=${{ secrets.AUTOMATION_GITHUB_TOKEN }}
          build_version=${{ env.SHORT_IMAGE_TAG }}-${{ env.SHORT_SHA }}

Workflow logs

#1 [internal] load git source https://github.com/.....
#1 0.154 fatal: could not read Username for 'https://github.com/': terminal prompts disabled
#1 ERROR: failed to fetch remote https://github.com/.....: git stderr:
fatal: could not read Username for 'https://github.com/': terminal prompts disabled
: exit status 128
------
 > [internal] load git source https://github.com/....:
0.154 fatal: could not read Username for 'https://github.com/': terminal prompts disabled
------
ERROR: failed to build: failed to stat policy file Dockerfile.rego: failed to load cache key: failed to fetch remote https://github.com/xpertyme/device-measurements.service.api.git: git stderr:
fatal: could not read Username for 'https://github.com/': terminal prompts disabled
: exit status 128

BuildKit logs

Use 0.32.0 version spec cache key for v0.32.0
  Warning: Failed to restore: Cache service responded with 400
  Downloading https://github.com/docker/buildx/releases/download/v0.32.0/buildx-v0.32.0.linux-amd64
  /usr/bin/tar --posix -cf cache.tzst --exclude cache.tzst -P -C /runner/_work/device-measurements.service.api/device-measurements.service.api --files-from manifest.txt --use-compress-program zstdmt
  Warning: Failed to save: <h2>Our services aren't available right now</h2><p>We're working to restore all services as soon as possible. Please check back soon.</p>05i2oaQAAAACU2NN24rUMQLi39ci9q2DKUFJHMDFFREdFMDcxMwBFZGdl
  Cached to /home/runner/.docker/buildx/.bin/0.32.0/linux-x64/docker-buildx
Install buildx
  Docker plugin mode
  Fixing perms
  Plugin path: /home/runner/.docker/cli-plugins/docker-buildx
Buildx version
  /usr/local/bin/docker buildx version
  github.com/docker/buildx v0.32.0 a953c9b4b457d29a1559364f1006865fd042c66d

Additional info

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    kind/bugSomething isn't working

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions