If you want to learn how to use the GitHub Desktop app to manage private or public Bitbucket repositories, you're in the right place. In a few simple steps, I'll show you how to create a Bitbucket app password and then use it to clone and manage repositories.
First, download the GitHub Desktop app. There are both Windows and MacOS versions. When you install it, you will be prompted to log in with your GitHub account. This step can be skipped by selecting the "Skip this step" option.
You will then need to enter a name and email address that
git will use to identify commits.
This completes the first step.
Atlassian has recently changed the way you access their repositories. In git clients, you should NOT use the portal username and password pair, but instead, you should create a dedicated application password and use your username instead of email.
Create an application password:
- Log in to the Bitbucket portal
- Click on the gear icon in the top right corner next to your profile picture.
- In the window that appears, select "Personal Bitbucket settings".
- On the "Personal settings" page, select the "App password" link in the left menu.
- Click on the "Create app password" button.
- On the page that appears, enter a name of your choice. This is just to let you know later which password belongs to which app.
- Check the required permissions. What you need is the Repository read and write.
- Click on the Create button.
- In the popup window that appears you will find the generated password. IMPORTANT, save this password so that you will never be able to see it again!
Once you have the password, all you need is the username. Many people still use an email address to access the portal and it is not the same as the username.
You can find your username on the "Personal settings" page under "Account settings".
Getting Bitbucket repository URL:
- Select the repository you want to use and click on the Clone button on the top right.
- Use the default HTTPS mode and copy the repository link
- In the GitHub desktop application, select the "Clone a repository from the Internet..." option.
- In the pop-up window, select the URL tab, then copy the repository link.
- Note that the copy on the Bitbucket page also copies the "git clone" command, this should be deleted for the GitHub Desktop application.
- Add the local target directory.
- Click on the Clone button.
- After some network communication, the authentication window will pop up. The application asks you to enter the Bitbucket username and generated application password that you found earlier.
If all goes well, you're done!