Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

It's not the same without you

Join the community to find out what other Atlassian users are discussing, debating and creating.

Atlassian Community Hero Image Collage

I have the CLI plugin installed but how do I use it from Jenkins


So I have this CLI plugin installed I went thru the docs and see examples but I think they assume I know how to run them. What I need to do is do some action against a repo using this as there is no REST API for setting the branch restrictions. I saw this has that capability but I have no idea how to call this from Jenkins...I could ssh from Jenkins to the Bitbucket server but what is the application name? Once the plugin is installed should it be available at the OS? I am on Linux.  I mean is it just ACLI then the parameters? or what is the executable? Is there a way to call it without ssh to the server? 

These are probably simple but I need a kick start.


1 answer

1 accepted

Hi @TC - You're really close!  Once the ACLI is installed on the server from which you will run it, you can simply run it like anything else in the shell.  acli is the shell script you will run and then you provide the action you wish to take and the parameters for that action.

acli --action addSshKey --userId "testuser1" --file "./" --server https://mybitbucket --user [user] --password [password]


Ok so what does installing the plugin in bitbucket get me? Does that install acli on the bitbucket server? or do we also have to download/install say Linux: and then whne you run it is it independent of the plugin? Or does it work with the plugin? Guess I don't understand the purpose of it. Sorry for the noob questions but this is my first foray into using this because I want to set branch restrictions programatically and I can't find a good rest call to do it but saw cli can.

Never mind I see now you install the client where you will use it and you have to have the plugin installed for it to function so a client-server configuration style. I think I can take it from here I appreciate the help.

No problem!  Feel free to ask here or our support team for any further help:

Suggest an answer

Log in or Sign up to answer
Community showcase
Published in Bitbucket

New improvements to user management in Bitbucket Cloud 👥

Hey Community! We’re willing to wager that quite a few of you not only use Bitbucket, but administer it too. Our team is excited to share that we’ll be releasing improvements throughout this month of...

3,762 views 10 16
Read article

Community Events

Connect with like-minded Atlassian users at free events near you!

Find an event

Connect with like-minded Atlassian users at free events near you!

Unfortunately there are no Community Events near you at the moment.

Host an event

You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events

Events near you