Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

I am getting a 401 error trying to access Google Cloud when a Pipeline executes

reselbob01 January 26, 2018

I am trying configure pipleline to post to Google Storage.

I follow the direction here:

https://cloud.google.com/solutions/continuous-delivery-bitbucket-app-engine\\ 
Admittedly I am not using App Engine.

I have the environmental variables defined as directed in the documentation above at my bitbucket global level.

Here is my pipeline yaml:

pipelines:
default:
- step:
script:
- echo "Everything is awesome in Master"
branches:
staging:
- step:
script:
# Downloading the Google Cloud SDK
- curl -o /tmp/google-cloud-sdk.tar.gz https://dl.google.com/dl/cloudsdk/channels/rapid/downloads/google-cloud-sdk-155.0.0-linux-x86_64.tar.gz\\ - tar -xvf /tmp/google-cloud-sdk.tar.gz -C /tmp/
- /tmp/google-cloud-sdk/install.sh -q
- source /tmp/google-cloud-sdk/path.bash.inc
- gcloud -v
# package up the application for deployment
- gsutil -m cp -r *.html gs://staging.reselbob.com

Here is the output within the pipleline:

+ gsutil -m cp -r *.html gs://staging.reselbob.com
Copying file://index.html [Content-Type=text/html]...
Copying file://error.html [Content-Type=text/html]...
/ [0/2 files][ 0.0 B/ 160.0 B] 0% Done 
/ [0/2 files][ 0.0 B/ 160.0 B] 0% Done 
ServiceException: 401 Anonymous caller does not have storage.objects.create access to staging.reselbob.com/index.html.
ServiceException: 401 Anonymous caller does not have storage.objects.create access to staging.reselbob.com/error.html.
CommandException: 2 files/objects could not be transferred.

Any help you can offer will be greatly appreciated. I've been at this for a while.

Bob

1 answer

0 votes
Bob Reselman
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
January 27, 2018

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events