You're on your way to the next level! Join the Kudos program to earn points and save your progress.
Level 1: Seed
25 / 150 points
Next: Root
1 badge earned
Challenges come and go, but your rewards stay with you. Do more to earn more!
What goes around comes around! Share the love by gifting kudos to your peers.
Keep earning points to reach the top of the leaderboard. It resets every quarter so you always have a chance!
Join now to unlock these features and more
this not work
wget --user=BitbucketUsername --password=AppPassword --auth-no-challenge https://bitbucket.org/workspace-id/repo-slug/raw/master/folderA/folderB/folderC/file.xml
please solve error
--2022-12-14 13:54:57-- https://bitbucket.org/workspace-id/repo-slug/raw/master/folderA/folderB/folderC/file.xml
Resolving bitbucket.org (bitbucket.org)... 104.192.141.1, 2406:da00:ff00::22c5:2ef4, 2406:da00:ff00::22c0:3470, ...
Connecting to bitbucket.org (bitbucket.org)|104.192.141.1|:443... connected.
HTTP request sent, awaiting response... 401 Unauthorized
Username/Password Authentication Failed.
already my project need to use wget and not curl and your BitbucketUsername:AppPassword is not working I already try them and neither on the api nor on the raw file
wget --user=BitbucketUsername --password=AppPassword --auth-no-challenge https://bitbucket.org/workspace-id/repo-slug/raw/master/folderA/folderB/folderC/file.xml
not work return 404
wget https://BitbucketUsername:AppPassword@bitbucket.org/workspace-id/repo-slug/raw/master/folderA/folderB/folderC/file.xml
not work return 404
wget --user=BitbucketUsername --password=AppPassword --auth-no-challenge https://api.bitbucket.org/2.0/repositories/workspace-id/repo-slug/src/maste/folderA/folderB/folderC/file.xml
not work
return this error
{"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."}}
wget https://BitbucketUsername:AppPassword@api.bitbucket.org/2.0/repositories/workspace-id/repo-slug/src/maste/folderA/folderB/folderC/file.xml
not work
return this error
{"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."}}
the only one that works is with the token
and still only one works
wget --user=x-token-auth --password=privatetoken --auth-no-challenge https://api.bitbucket.org/2.0/repositories/workspace-id/repo-slug/src/maste/folderA/folderB/folderC/file.xml
not work
return this error
{"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."}}
wget https://x-token-auth:privatetoken@api.bitbucket.org/2.0/repositories/workspace-id/repo-slug/src/maste/folderA/folderB/folderC/file.xml
not work
return this error
{"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."}}
wget --header "Authorization: Bearer privatetoken" https://api.bitbucket.org/2.0/repositories/workspace-id/repo-slug/src/maste/folderA/folderB/folderC/file.xml
only this work
which can be disturbing because some config
cannot pass custom header
nor make a post request
it would therefore be necessary to ensure that one of those is 100% functional without which there is no other verification therefore no verification of user-agent or others
or
or
or
except none of those works
Hi @andykimpe and welcome to the community.
It is not possible to download repository source code files this way. You can use our API instead:
Below is an example call with curl:
curl -u BitbucketUsername:AppPassword https://api.bitbucket.org/2.0/repositories/workspace-id/repo-slug/src/master/myFile.xml -o myFile.xml
Please feel free to let me know if this works for you.
Just a heads up I removed the file URL from your post to comply with our privacy policy. I also moved your post to a separate question; it's best to create a new question if you need assistance, as a post can become difficult to follow if we troubleshoot multiple users' different issues.
Kind regards,
Theodora
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Welcome to the Atlassian Community!
Bitbucket username/password authentication was deprecated over 6 months ago. See https://community.atlassian.com/t5/Bitbucket-articles/Announcement-Bitbucket-Cloud-account-password-usage-for-Git-over/ba-p/1948231
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.