BitBucket Code Repository for Raspberry Pi

BitBucket and GitHub are both excellent cloud based tools that provide online code backup and version control.

Once you start developing some code on your Raspberry Pi (or any other linux platform) you’ll need a reliable and easy method to archive your work.

Since the Raspberry Pi has built in Ethernet, and optional Wi-Fi connectivity, cloud based solutions are easy to implement.  They provide a secure and reliable off-site location to protect your data that is accessible almost anywhere.

Both BitBucket and GitHub provide basic service FREE for a single user.

GitHub

GitHub

BitBucket

BitBucket

Both applications support the Git methods and command line operations.  So from a development point of view, they are transparent after the initial setup.  Once the system is configured to connect with the repository using the proper credentials the commands to generate commits, comments and pushes are identical.

So which one to choose?  Well that depends.  Encouraging the mantra of free and open source, GitHub does not offer any private repositories for their free plan.  That’s great and for most people it is likely the best choice.  However, certain factors might sway you to consider using BitBucket as the number of private repositories for the first 5 users is unlimited.  For some projects, the server may be connecting to certain online cloud services and risk expose the login credentials or other private information embedded in the code.

Configuring ArchLinux for BitBucket

STEP 1

Create a BitBucket account

STEP 2

Start with the documentation here:

https://confluence.atlassian.com/display/BITBUCKET/Set+up+Git

install git

STEP 3

Set up the ssh key:

https://confluence.atlassian.com/display/BITBUCKET/Set+up+SSH+for+Git

STEP 4

Set up your local machine per the instructions from BitBucket:

git setup

DONE

Great now that should give you some peace of mind.  If anything happens to your SD card it will be simple to reconstruct your development environment.  This is also a great way to distribute your code to other platforms, or if you wish you can make your repository public or send links to someone you want to share the code with.

TROUBLESHOOTING

If you receive an Invalid SSH Key message you can use ssh-keygen to validate the key.  Copy the SSH key and paste it into a new file called temp.pub then run:

ssh-keygen -l -f temp.pub

One Comment

Add a Comment

Your email address will not be published. Required fields are marked *