Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix unauthorized error with buildx needing multiple credentials #1693

Merged
merged 1 commit into from
Jul 28, 2023

Conversation

eocantu
Copy link
Contributor

@eocantu eocantu commented Jul 11, 2023

This addresses a 401 Unauthorized error when building for multi-platform and multiple credentials are needed for different registries. For example, if the image name is registry-one.org/library/example and the base (FROM) image is in another registry (e.g. registry-two.org), two credentials are needed: one for each registry.

I believe this would also fix #1583 .

@codecov
Copy link

codecov bot commented Jul 11, 2023

Codecov Report

Merging #1693 (8be2efc) into master (6eeb78a) will increase coverage by 0.15%.
The diff coverage is 89.65%.

❗ Current head 8be2efc differs from pull request most recent head dba3339. Consider uploading reports for the commit dba3339 to get more accurate results

@@             Coverage Diff              @@
##             master    #1693      +/-   ##
============================================
+ Coverage     64.01%   64.17%   +0.15%     
- Complexity     2198     2216      +18     
============================================
  Files           171      172       +1     
  Lines          9985    10040      +55     
  Branches       1371     1380       +9     
============================================
+ Hits           6392     6443      +51     
- Misses         3058     3061       +3     
- Partials        535      536       +1     
Impacted Files Coverage Δ
...io/fabric8/maven/docker/service/BuildXService.java 74.14% <ø> (-0.69%) ⬇️
...c/main/java/io/fabric8/maven/docker/BuildMojo.java 51.20% <82.85%> (+11.63%) ⬆️
...ava/io/fabric8/maven/docker/access/AuthConfig.java 100.00% <100.00%> (ø)
...io/fabric8/maven/docker/access/AuthConfigList.java 100.00% <100.00%> (ø)
.../fabric8/maven/docker/service/RegistryService.java 80.72% <100.00%> (ø)

... and 1 file with indirect coverage changes

Signed-off-by: E. Cantu <eocantu@users.noreply.github.com>
@sonarqubecloud
Copy link

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 2 Code Smells

91.5% 91.5% Coverage
0.0% 0.0% Duplication

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Multi-platform buildx: unauthorized for fetching metadata for the base image
2 participants