Creating a repository in bitbucket using REST api via SSH?

Hi,

We are using bitbucket server in our environment.

I want to know if we can connect to bitbucker server via the REST api to create a repository using SSH.

I was able to do that using Basic Authentication ,but not sure if I can hit the REST api with SSH.

Is this supported? if not , is there a better approach than exposing credentials by using the username and password to get a base64 encoded string and passing it via the Basic authentication to create the repository.

 

 

 

1 answer

1 accepted

0 vote

Hi Sridhar

Thank you for the question.

Let me start that it's not possible to send REST API requests through SSH because REST API call is an HTTP(S) request by design.

However, it's not possible to create the repositories without sending the credentials it's still possible to perform changes on the repositories using Personal Access Tokens.

Thanks for your response. But, personal access tokens seems to for each individual user. I am want to use it as a global one so that it can be used for creating repositories by an admin user either from command line or via a admin ui.

Hi Sridar

You're not the only one who wants tokens for the admin accounts. I've logged a feature suggestion for it BSERV-10482

I would recommend you to share your point with our developers as well so they will be aware of the business cases when the tokens for admin access are desirable.

Suggest an answer

Log in or Sign up to answer
How to earn badges on the Atlassian Community

How to earn badges on the Atlassian Community

Badges are a great way to show off community activity, whether you’re a newbie or a Champion.

Learn more
Community showcase
Posted Jun 12, 2018 in Bitbucket

Do you use any Atlassian products for your personal projects?

After spinning my wheels trying to get organized enough to write a book for National Novel Writing Month (NaNoWriMo) I took my affinity for Atlassian products from my work life and decided to tr...

22,931 views 26 12
Join discussion

Atlassian User Groups

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

Find a group

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

Find my local user group

Unfortunately there are no AUG chapters near you at the moment.

Start an AUG

You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs

Groups near you