Missed Team ’24? Catch up on announcements here.

×
Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

Permission denied in bitbucket-upload-file

fperron
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 10, 2020

Hello,

I'm trying to upload a saved docker image to downloads.

The file is found since it passes the check on pipe.py line 39, but I get a permission denied on pipe.py line 45.

--- the error ---

Traceback (most recent call last): File "/pipe.py", line 78, in <module> pipe.run() File "/pipe.py", line 45, in run with open(filename, 'rb') as f:PermissionError: [Errno 13] Permission denied: 'pigeon-web-13'

--- the config ---

default:
- step:
caches:
- docker
services:
- docker
script:
- ./scripts/build.sh $BITBUCKET_BUILD_NUMBER
- pipe: atlassian/bitbucket-upload-file:0.1.2
variables:
BITBUCKET_USERNAME: $BITBUCKET_USERNAME
BITBUCKET_APP_PASSWORD: $BITBUCKET_APP_PASSWORD
FILENAME: pigeon-web-$BITBUCKET_BUILD_NUMBER

--- the script ---

The build script does not chown or chmod the file.

The image file is created with a simple 

docker save

 

Would you help me understand how I can make the file accessible to the pipe?

 

Thanks, 

2 answers

0 votes
Alexander Zhukov
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
January 13, 2020

Hi @fperron could you share the output of the following command in the pipeline:

stat pigeon-web-$BITBUCKET_BUILD_NUMBER
0 votes
fperron
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 11, 2020

It works with the classic curl


curl -s -X POST \
https://${AUTH}@api.bitbucket.org/2.0/repositories/${USER}/${REPO}/downloads \
-F files=@${FILE}

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events