Hi,
I am new to Bitbucket.
My Admin has created a new Project PRS. It's path is like http://server:port/projects/PRS. He said I can now be able to add code.
I need to create a Repository / folders like QA & PROD and add code in it. Could you please guide me in simple steps either through Git CMD or Git UI?
Thanks in advance.
David
Hi David!
You can find step by step instructions on how to create a repository using the Bitbucket UI at Creating repositories. If you prefer to do it through the Git CMD, you can read Setting up a repository.
Once you've done that, you'll start coding. In this other article you'll learn how to get started with Git and Bitbucket and how to push your code to Bitbucket, visit Getting started with Git and Bitbucket Server.
Also, if you'd like to use a Git client, you can install Sourcetree which is free and available for Mac and Windows.
I hope this helps, David. Let me know if you have any questions!
Cheers,
Ana
Hi Ana!
Thank you very much! I will follow the steps.
I have a question : I dont see the option "Create Repository" from UI. Can I be able to create a repository with command line? ( assuming I dont have Project Admin Rights)
Thank you,
Hi David, when you click Repositories in the navigation bar, a menu will be displayed and you'll see your recent repos and the option to create a new one. If you can not see the Repositories button, you'll need to check with your admin if you have the right permissions. If you still don't see it, you can send a screenshot of what you see in your Bitbucket UI (remember to remove any sensitive information )
If you prefer to do it via command line, you can use:
git init <directory>
That will create an empty Git repository in the specified directory. You can find more info at Setting up a repository.
Were you able to create a repository now?
Hi Ana, Thanks for the reply.
I have followed up with my Admin to provide "Project Admin" access. Now, I am able to see the option and able to create the Repository.
Before "Project Admin" access is given to me, I have tried using Command line but unable to doit.
More recently, we can just use bitbucket-cli.
bitbucket-cli
Install it using pip
pip
pip install bitbucket-cli
Then create a repo using
bitbucket create --private --protocol ssh --scm git YOUR_REPO_NAME
Note that this creates a private git repo, you can use --public for public access and --scm hg if you use Mercurial. Username argument can be added via --username YOUR_USER_NAME.
--public
--scm hg
--username YOUR_USER_NAME
Thanks to Stephen
I've been using this but the APIs are suddenly deprecated.
Does anyone have an alternative? I miss it so much!
Email the owner Zhehao and ask him to update it OR open source it https://pypi.org/project/bitbucket-cli/
This API is no longer supported.\n\nFor information about its removal, please refer to the deprecation notice at: https://developer.atlassian.com/cloud/bitbucket/deprecation-notice-v1-apis/"
Any news on this?
As a community, maybe we can together take over the project and update to new API version?
At least just for creating a new repo.
What do you say?
I believe that the problem is that the new API on the backend does not support this functionality.
Actually it does - I was able to use the new API with curl to create new repositories and projects.
Posted this in error (there is no delete function?!)
Vladimir, it's a great idea. (I don't have the time or the skills right now, unfortunately.)
Hey guys this is not working for me. i am getting this:
{"type": "error","error": {"message": "Forbidden"}}
but in the AppPassword i can see my access. i can use the GET method as in
curl -X GET -u MyUSER:$ADMIN_TOKEN -H 'Content-Type: application/json' https://api.bitbucket.org/2.0/teams/MyUSER/projects/ | jq .
Please help
It looks like you're new here. Sign in or register to get started.