Building bots can be fun. Losing your code, not so much.
I’ve recently been building random attended bots using UiPath to automate things in my life and to generally play around with the technology. As some of these projects have matured to the point of utility, I’ve since started thinking about how to protect my code. Building “hello world” bots is one thing, but when you start using the bot for repeatable tasks, it’s time to check your code in.
We use GitLab at work and the bots I was experimenting with were for the job. As such, I wanted to use our existing GitLab instance and just plug in UiPath. After doing some cursory searches on the Internet, I really didn’t find much related to how to integrate and use these two tools together. I found some generic articles on git and UiPath and a quite a few using GitHub for UiPath, but nothing really for GitLab.
So, I decided to figure it out. Once I did, I figured I might as well share the knowledge in case others are looking for the same setup. I put together a quick tutorial that you can check out on my YouTube channel and which is embedded below. If you have questions, just let me know.
The steps are pretty straightforward once you know what you are doing. At a high level, these are the steps.
New Projectin GitLab as a test but the same steps would be used for an established project.
Access Tokenthat you can use to configure UiPath for connecting and authenticating to GitLab
Access Tokensomewhere safe as you’ll need to use it in the process and may want to be able to reference it again in the future. GitLab does not allow you to see the value after you have generated it.
Add to Source Controltaskbar menu item in the bottom right. Then click on
git initto initialize your local codebase for git.
Pushfrom the taskbar menu in the bottom right showing
masterbranch. This will bring up a dialog box to enter your repo name and URL and your authentication credentials (username,
NOTE: If you receive an error that says something like, “pre-receive hook declined” you’ll need to change some parameters on your repo. Go to GitLab->Settings->Repository->Protected Branches and unprotect the branch.
Hopefully the video provides you the information you need to make sure your code is protected and managed. If you have any questions or need clarification of any of the steps, just let me know.