docker / docker-credential-helpers

Programs to keep Docker login credentials safe by storing in platform keystores
MIT License
1.06k stars 169 forks source link

Unable to create background process from store process #261

Open mridlen opened 1 year ago

mridlen commented 1 year ago

I'm trying to background a process, and this is just an example code that triggers the behavior... I realize it isn't working code.

code:

case "$1" in
  "store")
    (
    while :
    do
      echo "sleeping..." > /dev/tty
      sleep 30
    done
    ) &
  exit 0
   ;;
esac
[...]

When I run the credential helper manually from the command line like this, it works and spits me back out to a command prompt: echo '{ <JSON> }' | docker-credential-blah store

But when I use podman to log in: podman login url.com

It asks for username and password (from the "get" process) but then just hangs once it gets to the "store" process.

I even tried moving the background code to a separate script and running that, but it still waits for that code to finish before continuing on. I think it must be waiting for all the child processes to complete.