simple upload removed....?

sean green January 7, 2025

There was a nice little button on the download area for a simple upload Its gone now... That's very unkind.

 

Looking at my options curl seem to be the best option, buts the info is out of date or vague. I'm pretty sure my user name ( its an email ) will not work. Plus I doubt we still use a plane [password in this day?

 

anyways flowing the many guides leaves me with

 

 

curl --user email@email.com:1234 -X POST https://api.bitbucket.org/2.0/repositories/bliss-box/firmware/src -F latest.hex=@latest.hex

 

Since curl has no output, I'm at a loss why its not working. Can anyone add some info to the terrible documentation?

what is user name?  Does it want my login email? IS there a special non email login?
what is password? Is it plane text or open auth 2.0?
Did I get the API path names right?
Do I append with src or downloads?

 

 

2 answers

0 votes
sean green January 9, 2025

moving comment

 

0 votes
Mark C
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
January 8, 2025

Hi @sean green

Welcome to the community.

For the CURL command, you will need to use your Bitbucket Cloud username and App password as your password credentials.

You can check out this article for the same: Deploy build artifacts to Bitbucket Downloads

Regards,
Mark C

sean green January 9, 2025

 

 

Hi I gave that a go, but it does not create a user name, I'm assuming the label is the user name? That did not update the file, but you also didn't comment on my syntax, I'm still unsure I have that right.

sean green January 9, 2025

also the add variable box where is says

 

Define variables that can be used in your YAML file or scripts.

If you want the variable to be stored unencrypted and shown in plain text in the logs, unsecure it by unchecking the checkbox.

[name] <--- this box will allows no input.

sean green January 9, 2025

Also I see a note at the bottom saying I need to be admin, not sure I get that I'm the only account owner?

Mark C
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
January 9, 2025

Hi @sean green

From CURL command you shared, it is referring to uploading a commit in your repository.

Could you confirm what you're trying to achieve at the moment?

May I know if you'd like to upload/push a commit via API or upload a file via the repository "Downloads" section?

Regards,
Mark C

sean green January 10, 2025

I need to update one file on the download section, not the repo.

Mark C
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
January 12, 2025

Hi @sean green

In that case, you can use the /downloads API endpoint instead.

Here's an example CURL command:

curl -X POST --user "bb_username:app_password_here" "https://api.bitbucket.org/2.0/repositories/workspace_id/repo_name/downloads" --form files=@"latest.hex"

Please note that you will need to change the following values with your credentials and repo URL.

bb_username:app_password_here - Change this with your Bitbucket Cloud username and App password

workspace_id/repo_name - Change this with your workspace and repository name

Regards,
Mark C

sean green January 13, 2025

I see how to make an app password, but I do not know how to get the user name?

sean green January 13, 2025

 

The system kept erasing my messages.

sean green January 13, 2025

The system kept erasing my messages.

sean green January 13, 2025

If I use my label as a user name I ge

$ curl -X POST --user ulso:*********************"https://api.bitbucket.org/2.0/repositories/bliss-box/firmware/downloads" --form files=@"latest.hex"
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
100 80648 0 0 100 80648 0 179k --:--:-- --:--:-- --:--:-- 179k

 

If I use my email name without domain I get

$ curl -X POST --user blissboxadapter:*********************" "https://api.bitbucket.org/2.0/repositories/bliss-box/firmware/downloads" --form files=@"latest.hex"
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
100 80865 100 217 100 80648 495 179k --:--:-- --:--:-- --:--:-- 187k{"type": "error", "error": {"message": "You may not have access to this repository or it no longer exists in this workspace. If you think this repository exists and you have access, make sure you are authenticated."}}

sean green January 13, 2025

 

The system kept erasing my messages.

sean green January 13, 2025

also if I go to all workspace it says click here to join, so I do not think I have one?

Mark C
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
January 13, 2025

Hi @sean green

You can find your Bitbucket Cloud username by going to this link: https://bitbucket.org/account/settings/

Let me know how it goes.

Regards,
Mark C

sean green January 14, 2025

it says

Username blissboxadapter

so my error is above. Can you help me know what is my repo, what is my work space, what is my account, because something is still wrong.
again, here is my errors I get

$ curl -X POST --user blissboxadapter:*********************" "https://api.bitbucket.org/2.0/repositories/bliss-box/firmware/downloads" --form files=@"latest.hex"
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
100 80865 100 217 100 80648 495 179k --:--:-- --:--:-- --:--:-- 187k{"type": "error", "error": {"message": "You may not have access to this repository or it no longer exists in this workspace. If you think this repository exists and you have access, make sure you are authenticated."}}



I put hits in the command
https://api.bitbucket.org/2.0/repositories/bliss-box/firmware/downloads


this is the URL
https://bitbucket.org/bliss-box/firmware/downloads/



Mark C
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
January 14, 2025

Hi @sean green

It seems that you don't have access to the repository.

You can try reaching out to the admins of the workspace/repository to provide you with access before running the CURL command.

Regards,
Mark C

sean green January 15, 2025

Mark, I am the admin? This is my bitbucket page, I'm the only one on it, I made it?

Mark C
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
January 16, 2025

Hi @sean green

Unfortunately, it seems that's not the case.
You can check this by going to the workspace - https://bitbucket.org/workspace_id
Then click the setting icon on the top right and see if you have the "Workspace settings" setting.

If not, that means you're not an admin of the workspace.

Regards,
Mark C

sean green January 17, 2025

For many reasons that simple impossible.  I remember  I had two ways to login to bitbubket,  Maybe I have two accounts? Is there a way to see who owns it?  It may give me a clue so that I can log in with the right account.

sean green January 17, 2025

Ok, found the account, I had two, btw, we could have save a lot of talk if you'd have answered the question on the first post.

 

 

There was a nice little button on the download area for a simple upload Its gone now... That's very unkind.

 

A simple, its still there would have been very helpful. I could have figure out there was a permission error if you'd have told me that. But was there on the login of my correct account.

 

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
TAGS
AUG Leaders

Atlassian Community Events