Where I use ControlMaster to reduce any lag between commands.
Commands 1) and 2) work fine, but with 3) I get strange behavior where the docker-credential-gcr prints to the screen as per normal saying it worked correctly, but then docker pull fails with a credential error. But then if I go into my terminal a few moments after 3) fails and paste the same ssh command as from 3), the command works correctly. Similarly, if I put a wait in the python script between 2) and 3) of more than the ControlMaster timeout, it works correctly.
If I send all three commands in the python script using:
(cross posted with superuser - sorry, not sure the best place to ask)
Via a python script, I am on a GCP VM trying to install docker, download docker-credential-gcr, and then authenticate+pull an image from gcr.
The commands are:
To submit each above command, I use the following:
Where I use ControlMaster to reduce any lag between commands.
Commands 1) and 2) work fine, but with 3) I get strange behavior where the docker-credential-gcr prints to the screen as per normal saying it worked correctly, but then docker pull fails with a credential error. But then if I go into my terminal a few moments after 3) fails and paste the same ssh command as from 3), the command works correctly. Similarly, if I put a wait in the python script between 2) and 3) of more than the ControlMaster timeout, it works correctly.
If I send all three commands in the python script using:
(ControlMaster settings removed) it also works fine.
Any idea what could cause these different behaviors?