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

Earn badges and make progress

You're on your way to the next level! Join the Kudos program to earn points and save your progress.

Deleted user Avatar
Deleted user

Level 1: Seed

25 / 150 points

Next: Root

Avatar

1 badge earned

Collect

Participate in fun challenges

Challenges come and go, but your rewards stay with you. Do more to earn more!

Challenges
Coins

Gift kudos to your peers

What goes around comes around! Share the love by gifting kudos to your peers.

Recognition
Ribbon

Rise up in the ranks

Keep earning points to reach the top of the leaderboard. It resets every quarter so you always have a chance!

Leaderboard

Come for the products,
stay for the community

The Atlassian Community can help you and your team get more value out of Atlassian products and practices.

Atlassian Community about banner
4,460,309
Community Members
 
Community Events
176
Community Groups

Fork the repo using rest api 2.0

Hi Team, 

I am planning to Fork a repo from existing repo in same workspace, and as I see this can be achieved with rest api 2.0. While doing as described in the documentation facing 

{
"type": "error",
"error": {
"message": "Something went wrong",
"id": "71d7d97157e045ce8dd74348e52384f8"
}
}
below is my request  
Body : 
{
"name": "helloworld",
"workspace": {
"slug": "sangameshwar550"
}
}
my workspace id is sangameshwar550 &  my existing repo is helloworld and I want to name the new repo as hellow_react
Am I missing anything here. 
Best Regards,
Sanga 

1 answer

0 votes
Mark C Atlassian Team Mar 31, 2022

Hi @Sangameshwar Sangaeshwar

Welcome to the community.

Based on the error message ID, it seems you can't rename the public repository because the project it's on is set as "private".

For this, you'll need to make sure your project setting is set to public.
You can check this by going to your project setting:

  1. Go to your workspace - https://bitbucket.org/workspace_id/
  2. Click Projects
  3. Click the project name
  4. Click Project settings
  5. Under Privacy, make sure "Private project" is unchecked

Also, to rename a repository, the below CURL command works for me.

curl -X PUT -u bb_username:app_password -H 'Content-Type: application/json' "https://api.bitbucket.org/2.0/repositories/workspace_id/repo_name" -d '{"name": "new_repo_name"}'

Here, you'll need to use your Bitbucket Cloud username and an App password

You can also check this documentation about it.

Hope it helps and let me know how it goes.

Regards,
Mark C

Suggest an answer

Log in or Sign up to answer
TAGS

Atlassian Community Events