BookmarkSubscribeRSS Feed

Can SAS Studio on SAS Viya Integrate with Bitbucket?

Started ‎03-29-2022 by
Modified ‎03-29-2022 by
Views 3,427

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.




Atlassian Account


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.


Bitbucket Repository


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.


Bitbucket and SAS Viya


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:


  • How do I authenticate from SAS? You can choose from two options: HTTPS or SSH. I will be choosing HTTPS for this post. HTTPS communicates over port 443 and requires a user and a password.
  • Do I prefer a visual interface, or am I OK to use git commands? If you require an interface, then the only obvious place to add a Bitbucket repository is in SAS Studio.
  • Where do I clone the repository? You will need a folder on a network file share accessible from SAS Studio. The folder must have enough permissions to allow read, write and execute operations.

Authentication: Bitbucket App Password


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.




Bitbucket Repository URL


To clone the repository using HTTPS, your will require a repository URL, for example:




Bitbucket User and Email


The user in this example is sbxbot-admin. It can be identified in the repository URL as the part before ``.


The email is the one you used to register your Atlassian account.


SAS Viya


SAS Studio Settings


To clone the repository using HTTPS, your SAS Administrator must enable the following SAS Studio configuration options in SAS Environment Manager:


  • allowGit: to use the Git plug-in in SAS Studio.
  • allowGitPassword: to use HTTPS as an authentication method.
  • showServerFiles: to clone the repository on a network file share folder and see the cloned files.


As previously mentioned, Bitbucket is a “Git-based source code repository”, therefore the Git settings will work here just fine.






SAS Studio


In SAS Studio, to access the Bitbucket repository:

  • Create a Git profile.
  • Clone or add the repository.

Create a Git Profile


Choose HTTPS, indicate the Bitbucket user, the user account email and copy the app password created earlier.




Clone or Add a Repository


Clone a Git Repository


Indicate the repository URL, an empty folder, on a Network File Share (NFS), accessible from SAS Studio and the Git profile.




Successful Clone


When you clone the repository, you will know you are on the right path when you will see something similar:




Cloned Repository History


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!

Version history
Last update:
‎03-29-2022 10:43 PM
Updated by:


Available on demand!

Missed SAS Innovate Las Vegas? Watch all the action for free! View the keynotes, general sessions and 22 breakouts on demand.


Register now!

Free course: Data Literacy Essentials

Data Literacy is for all, even absolute beginners. Jump on board with this free e-learning  and boost your career prospects.

Get Started