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.
Asked
Active
Viewed 3,394 times
2 Answers
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}

Stephen Rauch
- 47,830
- 31
- 106
- 135

Swathi
- 292
- 4
- 6
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.
-
@Anuj you did, through the REST Brower API? – VonC Jun 09 '14 at 05:44
-
@Anuj and see the comment of http://stackoverflow.com/questions/23490763/how-to-get-full-list-of-repositories-that-allowed-for-user#comment36444326_23490763 – VonC Jun 09 '14 at 05:45
-
Yes through rest browser API. – Anuj Jun 09 '14 at 05:48
-
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. – Anuj Jun 09 '14 at 05:54
-
@Anuj 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. – VonC Jun 09 '14 at 06:25
-
@Anuj did the support gave you an answer? Or were you able to make that query work? – VonC Jun 10 '14 at 06:43
-
I made it work by asking the administrator to creating a user for me. By default, the bitbucket team user is disabled. – Anuj Jun 10 '14 at 06:54
-
@Anuj Excellent. I have added your conclusion in the answer for more visibility. – VonC Jun 10 '14 at 06:55
-
Thanks for the API link btw. – Anuj Jun 10 '14 at 07:10