In my Jenkins runs, gcloud randomly generates permissions errors as below. I verified that successful and failed runs are on the same machine, with the same user, in the same directory.
(I think the command causing failure is gcloud auth activate-service-account --key-file=fuf-automation-server.json )
(In success conditions we get "gcloud credential helpers already registered correctly")
Has anyone seen similar issues? Under what conditions can such failure occur? Can I redefine the logging and configuration directory to avoid this?
---------------------------------------
Failure logs:
WARNING: Could not setup log file in /.config/gcloud/logs, (Error: Could not create directory [/.config/gcloud/logs/2018.12.13]: Permission denied.
Please verify that you have permissions to write to the parent directory.)
The following settings will be added to your Docker config file
located at [/.docker/config.json]:
{
"credHelpers": {
}
}
Do you want to continue (Y/n)?
ERROR: (gcloud.auth.configure-docker) Error writing Docker configuration to disk: [Errno 2] No such file or directory: '/.docker/tmpzki75K'
WARNING: Could not setup log file in /.config/gcloud/logs, (Error: Could not create directory [/.config/gcloud/logs/2018.12.13]: Permission denied.
Please verify that you have permissions to write to the parent directory.)
ERROR: (gcloud.auth.activate-service-account) Could not create directory [/.config/gcloud]: Permission denied.
Please verify that you have permissions to write to the parent directory.
$ docker rm -f 06aa3ee44b9f03e75eaaa98fda1c4ff6f771a3b84d9ea416a39c8f6637599ccc
WARNING: Could not setup log file in /.config/gcloud/logs, (Error: Could not create directory [/.config/gcloud/logs/2018.12.13]: Permission denied.
Please verify that you have permissions to write to the parent directory.)
ERROR: (gcloud.config.set) Failed to create the default configuration. Ensure your have the correct permissions on: [/.config/gcloud/configurations].
Could not create directory [/.config/gcloud/configurations]: Permission denied.
Please verify that you have permissions to write to the parent directory.
WARNING: Could not setup log file in /.config/gcloud/logs, (Error: Could not create directory [/.config/gcloud/logs/2018.12.13]: Permission denied.
Please verify that you have permissions to write to the parent directory.)
ERROR: (gcloud.config.set) Failed to create the default configuration. Ensure your have the correct permissions on: [/.config/gcloud/configurations].
Could not create directory [/.config/gcloud/configurations]: Permission denied.
Please verify that you have permissions to write to the parent directory.
WARNING: Could not setup log file in /.config/gcloud/logs, (Error: Could not create directory [/.config/gcloud/logs/2018.12.13]: Permission denied.
Please verify that you have permissions to write to the parent directory.)
ERROR: (gcloud.config.set) Failed to create the default configuration. Ensure your have the correct permissions on: [/.config/gcloud/configurations].
Could not create directory [/.config/gcloud/configurations]: Permission denied.
Please verify that you have permissions to write to the parent directory.