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?
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
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I see how to make an app password, but I do not know how to get the user name?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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."}}
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
also if I go to all workspace it says click here to join, so I do not think I have one?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
it says
Username blissboxadapter
$ 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/
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Mark, I am the admin? This is my bitbucket page, I'm the only one on it, I made it?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.