Getting Error when running Gcloud commands on jenkins windows agent "When Running Gcloud commands on jenkins windows agent getting error like "This may be due to network connectivity issues. Please check your network settings, and the status of the s

19 views
Skip to first unread message

Shanmukha Bera

unread,
Mar 27, 2020, 12:18:12 AM3/27/20
to Jenkins Users
Hi Team,
We have master slave jenkins setup where i am running windows agent as slave and want to run my powershell script which consist of gcloud commands so wn we run on windows agent we are getting below error.
"This may be due to network connectivity issues. Please check your network settings, and the status of the service you are trying to reach."
So what we done as part of testing we manually login to agent and run the gcloud commands we able to get output .But when we run via jenkins we getting the error.
And the VM is part of gcloud so we are not using any plugin to authenticate to cloud jst we using service account to authenticate to gcloud.

NOTE:
None of Gcloud commands working Via jenkins.

How can we fix this issue?

Thanks,
Shanmukha 

James Nord

unread,
Mar 28, 2020, 1:04:13 PM3/28/20
to Jenkins Users
some built-in service accounts by their nature do not have network access for security.

generally don't run Jenkins or its agents as a built-in service type as it exposes your infrastructure too much (like running as root on Linux). try setting up a separate service account for Jenkins and configure the service to use that account.

Shanmukha Bera

unread,
Mar 29, 2020, 7:07:47 AM3/29/20
to Jenkins Users
Hi James,

Here I am using gcloud service account which generally we used to authenticate gcloud services.And One more question.
We have jenkins setup with proxy is that cause we are getting this error?
Reply all
Reply to author
Forward
0 new messages