The Atlassian Community Forums are currently in read-only mode. We will be relaunching on a new platform on September 22 (read more here). We apologize for the extended downtime. For concerns or questions, please email communitymanagers@atlassian.com. See you on the other side, on the new Atlassian Community Forums! :)

×

Forums

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

file upload pipe 0.7.1 cannot upload tar and tar.gz

stefan.arzbach
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!
June 14, 2024

File extensions we tested succeccfully: zip, msi, whl, test and targz (both renamed tar.gz)

INFO: Executing the pipe...
INFO: Start uploading 1 files ['keycloak_1.1.0.tar.gz']...
Traceback (most recent call last):
File "/pipe.py", line 126, in <module>
pipe.run()
File "/pipe.py", line 80, in run
response = requests.post(url, auth=self.auth, files=multiple_files)
File "/usr/local/lib/python3.10/site-packages/requests/api.py", line 115, in post
return request("post", url, data=data, json=json, **kwargs)
File "/usr/local/lib/python3.10/site-packages/requests/api.py", line 59, in request
return session.request(method=method, url=url, **kwargs)
File "/usr/local/lib/python3.10/site-packages/requests/sessions.py", line 575, in request
prep = self.prepare_request(req)
File "/usr/local/lib/python3.10/site-packages/requests/sessions.py", line 486, in prepare_request
p.prepare(
File "/usr/local/lib/python3.10/site-packages/requests/models.py", line 371, in prepare
self.prepare_body(data, files, json)
File "/usr/local/lib/python3.10/site-packages/requests/models.py", line 556, in prepare_body
(body, content_type) = self._encode_files(files, data)
File "/usr/local/lib/python3.10/site-packages/requests/models.py", line 191, in _encode_files
fdata = fp.read()
File "/pipe.py", line 117, in read
with open(self.filename, self.mode) as f:
PermissionError: [Errno 13] Permission denied: 'keycloak_1.1.0.tar.gz'

 

1 answer

Comments for this post are closed

Community moderators have prevented the ability to post new answers.

2 votes
Patrik S
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
June 18, 2024

Hello @stefan.arzbach ,

and welcome to the Community!

There shouldn't be any restriction on the extension of files that can be uploaded using the atlassian/bitbucket-upload pipe. Based on the error message in the output, this looks to be a permission issue instead, where the pipe does not have access to the file it's trying to upload (keycloak_1.1.0.tar.gz).

If your build is running with a different user than root, it may be creating that file with permissions limited to this user, so the pipe user may not have access to the file. To confirm if that's the case, could you try including the following command right before the pipe execution and try running it again? 

script:
- <other commands you may have>
- chmod 777 "keycloak_1.1.0.tar.gz # give full permissions to the file
- pipe: atlassian/bitbucket-build-statistics:1.1.1
    variables:
      <pipe variables>

Thank you, @stefan.arzbach !

Patrik S

DEPLOYMENT TYPE
CLOUD
PRODUCT PLAN
STANDARD
TAGS
AUG Leaders

Atlassian Community Events