[GIT] Repository Path ___ not owned by current user

I am trying to upgrade our Studio Version from 2022.10.4 to 2024.10.15 and I have GIT version control attached to our Automation projects.

I have a VM running 2022.10.4 and when I open one of our project, the GIT works fine and is connected.

However, when I open the same project on a new VM with 2024.10.15 installed, the GIT isn’t connected and is showing “Add to source control”. When I try “GIT init”, the following screenshot appears.

Bare in mind, the GIT connects fine when I open the project on any VM we have that has the 2022.10.4 version installed but since I have installed 2024.10.15 studio version on others, the following issue is occuring.

Can I get some assistance on how to fix this? As GIT is super useful and I don’t want to reset the connections if possible.

Thanks

Hi @josh0101 ,

Welcome to the Community!

Possible Cause Solution
File/folder not owned Take ownership via Properties > Security > Advanced
No write permission Grant “Full Control” to your current Windows user
Copied from another machine Take ownership or re-clone the repo
UiPath Studio not recognizing Try re-opening as Admin, or reinitialize repo

Please review these and let us know your results.

Happy Automation

HI @Tapas_Kumar_Pattnaik

I want to mention that all our projects are on a Shared network drive that all our VM service accounts have access to. Previously on the old version, any of our Bot VMs can open the project and the GIT is connected. It’s just since upgrading to a new version for example say on our “BOT1” vm, this error is happening. Could the reinstall of the new studio version have different GIT setting to the older studio version?
Thanks

  • In UiPath Studio versions from 2024 onwards (and other modern development tools), the Git library includes a security check to verify who owns the repository folder. If your repo lives on a shared network drive, Git cannot always confirm that the current Windows user owns that path.
  • In UiPath Studio 2022, this check was either not present or not enforced as strictly, so shared drive repos worked more easily across users and VMs.

You can tell Git to always consider your shared directory to be “safe” for all users. Add the safe.directory line in the global Git config.

Follow below steps, that might resolve your issue:

  1. Open Command Prompt as your service account (BOT1) on your VM.
  2. Run this command (replace Z:\Shared\UiPathProjects with your actual path):
git config --global --add safe.directory "Z:\Shared\UiPathProjects"
# OR for all directories (less secure but easy for shared drive environments)
git config --global --add safe.directory '*'
  • This will make Git (and UiPath Studio 2024+) treat this folder as trusted, resolving the error.
  1. Restart UiPath Studio and try to open the project again.

Note that:

  • This approach is widely used for companies with network/shared folder setups and team accounts.
  • You must do this for every VM and user running Studio, since the trust is per-user, per-machine.
  • It is not a UiPath Studio-specific change, but a security upgrade in Git/libgit2, which Studio now uses more strictly since version 2024.

Kindly check and let us know your result

Thank you.

Unfortunately, we don’t have GIT actually installed on our machines. We just use it directly within Studio

I). Edit (or Create) the Global .gitconfig File Manually

The location of the global config file for GIT/libgit2 (used by both the Git CLI and Studio) is:

  • C:\Users\<username>\.gitconfig (on Windows)

You can edit this file with Notepad or any text editor.

II). How to Change .gitconfig

  1. Open Notepad as your user on the problematic VM.
  2. Open the file:
    C:\Users\<your-windows-username>\.gitconfig
  • If it doesn’t exist, create it.
  1. Add the following lines (update the path to match your shared folder):

[safe]
directory = Z:/Shared/UiPathProjects

  • Use forward slashes / or escaped backslashes \\.
  • If you want to allow all directories (less secure but works for multiuser shared drives):

[safe]
directory = *

  1. Save the file.
  2. Restart UiPath Studio for the setting to take effect.

@josh0101

Few observations

  1. Its not good practice to use project from shared folders that can cause conflicts
  2. If aready in shared folders whats the point of git ideally you need to have git setup for each machine via studio so that you dont have any conflicts
  3. As epr error looks like there are differences in versions to confirm try to create new project and connect to git separately and see from local if you are able to connect..if yes then thats the issue

Hope this helps

Cheers

Hi @Anil_G

We don’t get any conflicts at all :slight_smile: We are a team of two and we don’t develop on a project at the same time.

We don’t need a git set up for each machine, we sign into our own Github account.

Thanks,