-
Notifications
You must be signed in to change notification settings - Fork 1.9k
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
login: slightly cleanup warning about unencrypted store #5258
Merged
thaJeztah
merged 2 commits into
docker:master
from
thaJeztah:cleanup_unencrypted_warning
Jul 18, 2024
Merged
login: slightly cleanup warning about unencrypted store #5258
thaJeztah
merged 2 commits into
docker:master
from
thaJeztah:cleanup_unencrypted_warning
Jul 18, 2024
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
…ials If we fail to save credentials, make sure that the error about saving doesn't get lost in the warning about credentials being stored unencrypted. Also discard errors about printing the warning, as those would be unlikely, and if they would occur, probably would fail to be printed as well. Signed-off-by: Sebastiaan van Stijn <[email protected]>
thaJeztah
added
status/2-code-review
kind/refactor
PR's that refactor, or clean-up code
labels
Jul 18, 2024
- Add an empty line before the warning to separate it from the command's output - Use the `/go/` redirect URL that we have available. - Put quotes around the filename used for storage. - Use present tense for the message, as the message is printed while saving. - User "credentials" instead of "password" for consistency with "credentials-store" Before: docker login myregistry.example.com Username: thajeztah Password: WARNING! Your password will be stored unencrypted in /root/.docker/config.json. Configure a credential helper to remove this warning. See https://docs.docker.com/engine/reference/commandline/login/#credential-stores Login Succeeded After: docker login myregistry.example.com Username: thajeztah Password: WARNING! Your credentials are stored unencrypted in '/root/.docker/config.json'. Configure a credential helper to remove this warning. See https://docs.docker.com/go/credential-store/ Login Succeeded Signed-off-by: Sebastiaan van Stijn <[email protected]>
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## master #5258 +/- ##
==========================================
- Coverage 61.49% 61.49% -0.01%
==========================================
Files 299 299
Lines 20828 20822 -6
==========================================
- Hits 12808 12804 -4
+ Misses 7110 7109 -1
+ Partials 910 909 -1 |
thaJeztah
force-pushed
the
cleanup_unencrypted_warning
branch
from
July 18, 2024 16:23
93674d5
to
fcefe44
Compare
krissetto
approved these changes
Jul 18, 2024
// unencryptedWarning warns the user when using an insecure credential storage. | ||
// After a deprecation period, user will get prompted if stdin and stderr are a terminal. | ||
// Otherwise, we'll assume they want it (sadly), because people may have been scripting | ||
// insecure logins and we don't want to break them. Maybe they'll see the warning in their |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🤞
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
login: don't print "unencrypted" warning when failing to save credentials
If we fail to save credentials, make sure that the error about saving
doesn't get lost in the warning about credentials being stored unencrypted.
Also discard errors about printing the warning, as those would be unlikely,
and if they would occur, probably would fail to be printed as well.
login: slightly cleanup warning about unencrypted store
/go/
redirect URL that we have available.Before:
After:
- A picture of a cute animal (not mandatory but encouraged)