Is there a way to find out bitbucket team repositories names using git?
Asked Answered
D

2

6

I have a bitbucket team which has several repositories but I forgot the user password to login. I have the user password credentials for team through which I can access and clone the repo. Is there a way to find out the names or link to repositories in this scenario? Any API or git command would do. I have searched all way on bitbucket site but could not find any information.

Doublebreasted answered 9/6, 2014 at 5:7 Comment(0)
C
5

You can test listing repostories with the REST Browser API, entering the credentials that you do have, and testing a:

https://bitbucket.org/api/1.0/user/repositories/

Or, in your case, selecting the 2.0 API:

https://bitbucket.org/api/2.0/teams/{teamname}/repositories

(replace {teamname} by the name of the team)


Th OP Anuj adds in the comments:

I made it work by asking the administrator to creating a user for me.
By default, the bitbucket team user is disabled.

Cartier answered 9/6, 2014 at 5:19 Comment(9)
@Doublebreasted you did, through the REST Brower API?Cartier
@Doublebreasted and see the comment of #23491263Cartier
Yes through rest browser API.Doublebreasted
Thanks for link. Now I am getting 200 OK but No results. I tried giving user, password parameters. The problem is that I know the password of only the team user which is not allowed to login using the bitbucket.Doublebreasted
@Doublebreasted then bitbucket support should able to help, in order to check if the credentials you have give you the right to access or not the information you seek.Cartier
@Doublebreasted did the support gave you an answer? Or were you able to make that query work?Cartier
I made it work by asking the administrator to creating a user for me. By default, the bitbucket team user is disabled.Doublebreasted
@Doublebreasted Excellent. I have added your conclusion in the answer for more visibility.Cartier
Thanks for the API link btw.Doublebreasted
I
6

The following cURL command will give all the repositories.

curl -s https://api.bitbucket.org/1.0/users/{teamname}/ -u {repo_user}:{repo_password}
Impression answered 16/12, 2014 at 12:19 Comment(0)
C
5

You can test listing repostories with the REST Browser API, entering the credentials that you do have, and testing a:

https://bitbucket.org/api/1.0/user/repositories/

Or, in your case, selecting the 2.0 API:

https://bitbucket.org/api/2.0/teams/{teamname}/repositories

(replace {teamname} by the name of the team)


Th OP Anuj adds in the comments:

I made it work by asking the administrator to creating a user for me.
By default, the bitbucket team user is disabled.

Cartier answered 9/6, 2014 at 5:19 Comment(9)
@Doublebreasted you did, through the REST Brower API?Cartier
@Doublebreasted and see the comment of #23491263Cartier
Yes through rest browser API.Doublebreasted
Thanks for link. Now I am getting 200 OK but No results. I tried giving user, password parameters. The problem is that I know the password of only the team user which is not allowed to login using the bitbucket.Doublebreasted
@Doublebreasted then bitbucket support should able to help, in order to check if the credentials you have give you the right to access or not the information you seek.Cartier
@Doublebreasted did the support gave you an answer? Or were you able to make that query work?Cartier
I made it work by asking the administrator to creating a user for me. By default, the bitbucket team user is disabled.Doublebreasted
@Doublebreasted Excellent. I have added your conclusion in the answer for more visibility.Cartier
Thanks for the API link btw.Doublebreasted

© 2022 - 2024 — McMap. All rights reserved.