Take this beginner-level course on 'Atlassian BitBucket' to delve into the core principles and applied benefits for your software projects. This course, made up of 8 lectures and 14 demos, will expertly teach and explain how to perform Git-related tasks along with implementing and connecting BitBucket to third parties while always being aware of the various security options available.
This course would appeal to a range of job roles including software developers, build and release engineers and DevOps practitioners. All of the skills that you will gain from doing this course will yield a tangible dividend for the projects with your enterprise; allowing you to use, control and manage BitBucket to manage and maintain your software products.
- Understand the basic principles of version control as implemented using the Git protocol and
- Learn how to effectively use BitBucket to manage and maintain your software projects
- Assess the benefits of using BitBucket to manage and secure your software engineering assets
- Recognize and explain how to perform all basic Git related tasks such as creating and cloning a repository, branching, and merging.
- Study to implement and connect BitBucket with other 3rd party systems
- Be aware of the different security options available to secure your BitBucket setup
- Be able to use, control, and manage BitBucket through either using the web-based administration console and/or by using a git client.
- Software Developers
- Software Build and Release Engineers
- DevOps Practitioners
To be able to get the most out of this course we recommend having a basic understanding of:
- Software development and the software development life cycle
- Software development tools
- Version control and associated workflows
Related Training Content
After completing this course we recommend taking the 'Introduction to Continuous Integration' Course
To discover more content like this, you will find all of our training in the Cloud Academy Content Training Library.
Okay, welcome back. In this first demonstration, we're going to use Bitbucket to create a basic Git repository. We'll then clone it locally to our work station. We'll create a simple web page and upload it. So, let's get stuck in. To get started with, if you haven't already, go into Bitbucket, create a new account, and log in. Once you're logged in, within the web admin console, simply click on the plus icon, create repository. Give it a name, in this case we'll all it CADemo. Make sure the version control system is set to Git, then simply click the Create Repository button. Bitbucket in the background will create your repository. We'll go with HTTPS. We'll copy the clone URL, and then we'll jump into our terminal. Okay, we'll paste it, click enter, and the first thing that we should be prompted for is the password. So we'll type in the password, and we've cloned successfully. We get a warning to say that we've cloned an empty directory, but that's okay 'cause we're about to populate it. So if we list the contents of the directory, you'll see that we have a CADemo folder. We'll navigate into that, list the contents again, and here you can see we've got a special .git directory. So this is the folder that Git uses to track our version control software. Okay, now that we're in our Git directory for our repository, let's fire up Visual code, and then we'll create our first file. Okay, we'll click on the Add File. We'll call it index.html. And here we'll use Emmet to generate our HTML, which is an awesome plugin to quickly craft HTML. So by doing an exclamation mark tab, we get the body of our HTML document for free.
Next, we'll tab into the body, and here we'll type some Emmet, some text to generate an unordered list of items. We'll do, say, 10 items. Brilliant. Okay, we'll leave it at that. We'll save the page, we'll jump back to our terminal. So the first thing we'll do is check our workspace, by writing git status. Here we can see we've got a single untracked file, index.html. So let's add that: git add index. Okay, we'll do git status again. Okay, so we've now added that index.html to our staging area. So we're ready to commit to the local repository, so we do git commit message, and I'll just call it commit 1 index.html. Okay, we've added that and committed it to the local repository. So the final thing we'll do for this demonstration is to push it up into our remote repository or the origin repository. So we do that by doing a git push. Okay, so the push has just completed successfully, and if we jump back into Bitbucket, into our repository, and now if we reload on the source view, we should see our first commit. And indeed we do, so here's our index with our commit message. We can navigate into it, and the source code is as it was when we were in Visual code, so that's great. Okay, so one final thing in this demonstration. You'll notice that we entered our credential once, when we first cloned the directory, but we haven't had to add the repository credential since.
So how is that possible? So I'm using a Mac to manage my software project, and one of the great things about the Mac is that there is a credential helper for Git, which allows us to take our credentials and we add them in and cache them into the keychain. So I've previously installed this OSX Keychain credential helper. Let's take a look to see where it was installed. So we can do so by running a couple of commands. So the first one, we'll run git config --local credental.helper. This returns empty. Next we'll run git config --global credential.helper. Again, this returns nothing. So finally we'll run git config --system credential.helper. And here you can see the configuration returns osxkeychain. Okay, so what does that mean? Well the first command checks the local repository config. The second command checks the home directory.git config file, and the third one is based on where Git has been installed. So what we can do now is run the command git config --show-origin --get credential.helper. And here indeed we can see that this is the path where the OSX Keychain has been installed. So if we cat this file out, you can see the configuration for our keychain helper is indeed embedded within this file. So again what I've tried to show here is how the OSX Keychain credential helper can be used to cache the credentials so that any subsequent git command that we run, such as git pull, doesn't require us to type those credentials back in as can be seen here. Okay, that completes this demonstration, go ahead and close it, and we'll see you shortly in the next one.
About the Author
Jeremy is the DevOps Content Lead at Cloud Academy where he specializes in developing technical training documentation for DevOps.
He has a strong background in software engineering, and has been coding with various languages, frameworks, and systems for the past 20+ years. In recent times, Jeremy has been focused on DevOps, Cloud, Security, and Machine Learning.
Jeremy holds professional certifications for both the AWS and GCP cloud platforms.