Hello,
I want to use bitbucket.org to upload and retrieve files via the api. I seen that there is this this: https://developer.atlassian.com/bitbucket/api/2/reference/ which show some curl examples and i seen the login call
curl -D- -u fred:fred -X GET -H "Content-Type: application/json" http://localhost:7990/rest/api/1.0/projects
i tried to use "curl -D- -u username:password -X GET -H "Content-Type: application/json" https://bitbucket.org/rest/api/1.0/projects " and 2.0 to connect to bitbutcket.org instead but i get ssl error and answers i find online is to enable that on the server but it's the online free version.
So not sure if the api is actually enabled for the online service or it's only working with the server.
Hi @creatortag21 ,
You can also use the REST API with Bitbucket CLoud, but you need to look at the right documentation, as they do not necessarily work in the same way.
For Bitbucket Cloud, you can check the docs at About Bitbucket Cloud REST API .
If you're still having difficulties getting ti to work, let us know what are you trying to achieve so we have a bit of context, You can also jump in the Developer Community for more help.
Hope that helps!
Kind regards,
Ana
Hello i'm using bitbucket.org that free version, i didn't buy any product. I was looking at that documentation and used this:
curl -X POST -u "client_id:secret" \
https://bitbucket.org/site/oauth2/access_token \
-d grant_type=authorization_code -d code={code}
To connect. And i can only connect with a test ssl contract (?) i think, i'm using c#
const SslProtocols _Tls12 = (SslProtocols)0x00000C00;
const SecurityProtocolType Tls12 = (SecurityProtocolType)_Tls12;
ServicePointManager.SecurityProtocol = Tls12;
This is my test ssl but with this it looks like what ever i do it just answers with a success message.
What i'm trying to achieve is download and uploading files to my bitbucket.
curl -s -u evzijst -X POST https://api.bitbucket.org/2.0/repositories/evzijst/git-tests/downloads -F files=@hello.txt
This is an example of what i want to achieve. I replace "evzijst" with my repository name and the @hello.txt with my file.
But it doesn't matter what the repository or the file is what ever i do it will say success. And i think that's because of my sslprotocol.
Looking in google i only find answers for activating ssl on my own bitbucket installation but this is not my own bitbucket this is the free online version that everyone can use onbitbucket.org.
So that's my problem. If i remove my sslprotocol i can't connect using the auth curl command. Do you have any idea how could i solve this?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
The request was aborted: Could not create SSL/TLS secure channel.
This is the error i have if i don't use that ssl i posted above.
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.