Skip to content

avoid saving secret to .bash_history and showing it on the screen#555

Open
nikelborm wants to merge 1 commit into
docker:mainfrom
nikelborm:patch-1
Open

avoid saving secret to .bash_history and showing it on the screen#555
nikelborm wants to merge 1 commit into
docker:mainfrom
nikelborm:patch-1

Conversation

@nikelborm

@nikelborm nikelborm commented Jun 11, 2026

Copy link
Copy Markdown

Why?

People tend to copy-paste the code from the README

@nikelborm nikelborm changed the title avoid saving secret to .bashrc and showing it on the screen avoid saving secret to .bash_history and showing it on the screen Jul 7, 2026
@nikelborm

nikelborm commented Jul 22, 2026

Copy link
Copy Markdown
Author

Although it should be noted that this approach is not ideal either, because the password will still be temporarily visible in, for example, htop, when the command line is expanded

UPD. Okay, I looked through the source, and it actually supports reading from stdin already without the need for any bash snippet (read -s -p "Enter the secret:" secret && docker pass set foo=$secret).

I've updated the PR to show people 2 available ways to set the secret, and the consequences of choosing the way that was shown initially

@nikelborm
nikelborm force-pushed the patch-1 branch 2 times, most recently from 208325e to 325a7e9 Compare July 23, 2026 19:12
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.

1 participant