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

It's not the same without you

Join the community to find out what other Atlassian users are discussing, debating and creating.

Atlassian Community Hero Image Collage

Permission denied in bitbucket-upload-file

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

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

stat pigeon-web-$BITBUCKET_BUILD_NUMBER

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
Community showcase
Posted in Trello

Taco Tuesday: Your favorite Trello blog takeaway

Hello friends! From the community that brought you Welcome Wednesday, Throwback Thursday and Friday Fun, welcome to Taco Tuesday, a weekly discussion about all things Trello. The best part? One Tac...

70 views 5 4
Join discussion

Community Events

Connect with like-minded Atlassian users at free events near you!

Find an event

Connect with like-minded Atlassian users at free events near you!

Unfortunately there are no Community Events near you at the moment.

Host an event

You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events

Events near you