I downloaded the BitBucket v2.5.3 application for free. BitBucket offers free private repositories for up to 5 users, 1GB total and 50 build minutes with pipelines. Get started with pipelines guide.
I needed to log in to bitbucket.org before signing up. I have a few Atlassian accounts so I made sure I logged in with the right account.
After logging in I was prompted with the Bitbucket beta (I said OK).
BitBucket beta is now activated now I can create a repository.
It appears BitBucket gives you 1Gb file storage for free, then $10 after that for 100 GB.
The next thing I did was include a menu item (link) to my new BitBucket Account in my Jira (Settings then Applications then Application Navigator) in Jira.
Now I can easily get to my BitBucket from JIRA.
When you create a repository on BitBucket you can import a repository from GitHub (I imported my repo that I created in GitHub).
Adding SSH Keys Locally
You can find SSL related SSL settings by clicking your user profile picture when logged into https://bitbucket.org/ then Bitbucket settings.
Then click SSH Keys.
As with GitHub we can generate a local machine generated SSH key and assign it to BitBucket to prevent using BitBucket password when we push code to BitBucket.
You can learn how to generate a key here.
Locally I entered a terminal and typed the following to generate a key.
cd ~/.ssh mkdir backup sudo cp *.* backup/ ssh-keygen -t rsa -C "bitbucket [email protected]"
I entered the following output filename when generating the key.
Performing a list directory in terminal you should see two new files.
cd ~/.ssh/ ls -al total 80 drwx------ 13 simon staff 442 30 Jun 22:19 . [email protected] 92 simon staff 3128 28 Jun 00:56 .. ... -rw------- 1 root wheel 3326 27 Jun 22:45 githubrsa -rw-r--r-- 1 root wheel 742 27 Jun 22:45 githubrsa.pub
You can use this command to copy the new public SSH key to clipboard.
cat bitbucket_rsa.pub | pbcopy
You can now paste this SSH key into Bitbucket’s UI.
I edited the description of the SSH key to include my laptop name.
You can see how I set up SSH keys on GitHub here.
You will also need to add your SSK key to the end of the known_hosts file
# edit the known_hosts file sudo nano known_hosts # Add this to the end of your known_host file (keep all contents in this file) bitbucket.org,22.214.171.124,126.96.36.199,188.8.131.52,184.108.40.206,220.127.116.11 ssh-rsa AAAA_paste_your_ssh_key_text_here bitbucket [email protected]
Verifying your SSH connection to Bitbucket
sudo ssh -T [email protected] The authenticity of host 'bitbucket.org (18.104.22.168)' can't be established. RSA key fingerprint is SHA256:removed. Are you sure you want to continue connecting (yes/no)? yes Warning: Permanently added 'bitbucket.org,22.214.171.124' (RSA) to the list of known hosts. Permission denied (publickey)..
I have issues with my terminal connecting to BitBucket? I have asked @Bitbucket and have not had a response.
My following command was failing?
sudo ssh -T [email protected] Permission denied (publickey).
I thought I would give the Bitbucket Gut SourceTree application a try.
I downloaded the zip file containing the application and ran the install wizard.
Unfortunately, the Atlassian Bitbucket SourceTree application failed to allow my account to sign in (infinite spinning wheel of death for 24 hours) – note the spinning wheel near the Cancel button.
I have had no luck getting SSH access to bitbucket from the terminal or SourceTree to log in. I asked @BitBucket for help on Twitter but have not heard anything.
In desperation, I tried again and this time selected HTTPS in SurceTree and was asked to grant access to my account (read and modify).
I can now see remote repositories (with my logged in identity).
Syncing (Pulling) the Repository with SourceTree
Time to check out an empty project #1 (repository clone) in SourceTree (seems SSH /terminal is not working in BitBucket).
This worked, I can see files locally.
Now it is time to clone a larger project that I imported from GitHub. This one took a little longer to clone.
All files synced down ok and teh SourceTree application is looking good.
Adding my first new local file(s) to the repository
Bitbucket is not working via terminal/SSH yet so I added a file ( called “testbitbucketfile.txt”) in Finder and tried to upload it with SourceTree by selecting Workspaces then File status then checking the file to ensure it was going to be uploaded (I was expecting a prompt to add the file after I created it but nothing appeared).
Submitting (pushing) changes (adding another file)
Because BitBucket was not working via terminal/SSH I tried to commit via SourceTree.
I selected Push then OK.
It appears I have an authentication error when I sync (why?, I am logged in and can see repositories and I granted read/modify access earlier)?
> Error: “Invalid username or password. If you log in via a third party service you must ensure you have an account password set in your account profile. fatal: Authentication failed”.
My account has been pre-authenticated, what gives SourceTree?
The only option I can see is switching to “basic” authentication (no thanks).
More worryingly BitBucket Source Tree reports “Completed successfully” when it is clear that the new files were not uploaded.
I appear to have to write access permissions for my repo so I have no ideas what is wrong.
I may be wrong but it appears I need to be a paid user to have a working Git repository? Time to use GitHib (as I know it works with SSH and syncs files).
This hereby ends my BitBucket test. I have no working BitBucket SSH environment on my OSX , poor support from Atlassian (poor documentation, slow social media replies and poor SourceTree error messages/UI) and SourceTree is overly optimistic on actions. I was logged in, granted read/modify access to SourceTree but I am unable to push back to a repo?
I received a message on my question on Twitter to @bitbucket and was asked to log a support issue.
I googled Atlassian support
I logged in and tried to log a support request but got stuck in an update profile loop
When I clicked save I was not redirected anywhere new and was directed back to the update profile details screen (no other tabs were open on my mobile device Safari/iPhone).
I submitted a bug report on a desktop browser (bug 4825 on the BitBucket/SRCTREE for Mac Jira).
I’ll stick with using GitHub (paid to get private repos) as Github’s SSH is working for me and files synced ok from the terminal with little effort. I am not happy with Bitbucket’s SSH (never got it working), SourceTree and Atlassian’s products appear to have many (700+) undocumented features.
Agile Project Management
Read my blog post on developing software and staying on track here.
I highly recommend you follow Dmitri Iarandine at http://joinagile.com/ (Agile Coach, Trainer, Host of Lean and Mean Agile). Podcast. Author of GET HIRED as SCRUM MASTER).
Dmitri can be found here too.
Soundcloud (Lean and Mean Agile Podcast):
Tips and Troubleshooting
You may need to set up a new branch for each repository and assign permissions before you can read the repositories.
Donate and make this blog better
Ask a question or recommend an article
v0.94 added info on agile and staying on track