Bitbucket is a Git-based source code repository hosting service. It is the third largest source code management software product. Some SAS customers are actively using Bitbucket. Which brings us to their question: can SAS Studio, on SAS Viya, integrate with Bitbucket? Read the post to find out the answer.
Bitbucket is developed by Atlassian, the same company making the world-famous JIRA. To access Bitbucket you will require an Atlassian account. To open an Atlassian account is easy. It takes a few minutes to register a free account, which includes Bitbucket. You can use your corporate email to register an account.
To create a Bitbucket repository, you must create a project first. Within a project, you can register as many repositories as you like. The concept is similar with GitHub or GitLab. In fact, Bitbucket is using a “Git-based source code repository”. With Bitbucket, you will be on familiar territory, if you used GitHub or GitLab, at some point, in the past.
Select any image to see a larger version.
Mobile users: To view the images, select the "Full" version at the bottom of the page.
With the Bitbucket repository initialized, you can start thinking how to add it in SAS Viya. There are several questions you need to answer first:
To access the Bitbucket repository, via HTTPS, you will require an app password. You can register one from your account’s personal settings. Following, you will have to select the permitted operations in Bitbucket.
Create the password and store it somewhere safe. You will not be able to retrieve the generated password later.
A Bitbucket app password is similar with a GitHub personal access token.
To clone the repository using HTTPS, your will require a repository URL, for example: https://sbxbot-admin@bitbucket.org/sbxbot/sasviya.git
The user in this example is sbxbot-admin. It can be identified in the repository URL https://sbxbot-admin@bitbucket.org/sbxbot/sasviya.git as the part before `@bitbucket.org`.
The email is the one you used to register your Atlassian account.
To clone the repository using HTTPS, your SAS Administrator must enable the following SAS Studio configuration options in SAS Environment Manager:
As previously mentioned, Bitbucket is a “Git-based source code repository”, therefore the Git settings will work here just fine.
In SAS Studio, to access the Bitbucket repository:
Choose HTTPS, indicate the Bitbucket user, the user account email and copy the app password created earlier.
Indicate the repository URL, an empty folder, on a Network File Share (NFS), accessible from SAS Studio and the Git profile.
When you clone the repository, you will know you are on the right path when you will see something similar:
In SAS Studio check the cloned repository history. You will see your earlier repository activity.
To access the repository files, check in Explorer, under the folder where you cloned the repository.
You are now ready to version control your code into the Bitbucket repository.
Can SAS Studio on SAS Viya integrate with Bitbucket? Yes, it can. You can add a Bitbucket repository in SAS Studio, the same way you would add any other Git repository.
Thank you for your time reading this post. If you liked the post, give it a thumbs up! Please comment and tell us what you think about post content. If you wish to get more information, please write me an email.
Find more articles from SAS Global Enablement and Learning here.
Thank you for this Bogdan! Another great blog!
Available on demand!
Missed SAS Innovate Las Vegas? Watch all the action for free! View the keynotes, general sessions and 22 breakouts on demand.
Data Literacy is for all, even absolute beginners. Jump on board with this free e-learning and boost your career prospects.