Skip to content
This repository has been archived by the owner on Mar 16, 2024. It is now read-only.

Print local credential usage after builds (#2068) #2070

Merged
merged 2 commits into from
Aug 15, 2023

Conversation

njhale
Copy link
Member

@njhale njhale commented Aug 15, 2023

Print a message to stdout when local docker credentials are used during acorn build.
This should make it more obvious when builds fail due to invalid local
credentials.

The message is printed at the end of both successful and failed builds.

e.g. output of a failed build w/ local cred usage message

[+] Building 5.3s (11/11) FINISHED                                                                                                                                   
   // ... ELIDED BUILD OUTPUT                                                                                                              0.0s
 => ERROR exporting to image                                                                                                                                    3.9s
 => => exporting layers                                                                                                                                         0.0s
 => => exporting manifest sha256:db534d916562a0663ee07bd52e8549431d6b13cc8c32c26e1a9ca55fdde61e28                                                               0.0s
 => => exporting config sha256:e4081843971dd0852fa32d8e83a21d5842887e826a1c252d0b1fd1892302c385                                                                 0.0s
 => => pushing layers                                                                                                                                           3.9s
------
 > exporting to image:
------
Used local credentials for: ghcr.io, index.docker.io
  ✗  ERROR:  failed to solve: failed to push ghcr.io/njhale/local-private-acornacorn: failed to authorize: failed to fetch oauth token: unexpected status: 403 Forbidden

Addresses #2068

Print a message to stdout when local docker credentials are used during `acorn build`.
This should make it more obvious when builds fail due to invalid local
credentials.

Signed-off-by: Nick Hale <[email protected]>
@njhale njhale requested review from thedadams, sosodev, iwilltry42, keyallis and tylerslaton and removed request for thedadams August 15, 2023 04:33
Co-authored-by: Darren Shepherd <[email protected]>
Signed-off-by: Nick Hale <[email protected]>
@njhale njhale merged commit 7c851ed into acorn-io:main Aug 15, 2023
@njhale njhale deleted the print-local-cred-use branch August 15, 2023 14:32
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants