Git init is disabled in uipath

not able to connect git to uipath


and for some local project i get git init
but getting below error
22.4.1+Branch.master.Sha.ae3dd5d96272ef2a8c7136934fe08624b9ad1069

Access to the path ‘C:\Users\pkumar13.gitconfig’ is denied.

Error: System.UnauthorizedAccessException: Access to the path ‘C:\Users\pkumar13.gitconfig’ is denied.
at Microsoft.Win32.SafeHandles.SafeFileHandle.CreateFile(String fullPath, FileMode mode, FileAccess access, FileShare share, FileOptions options)
at Microsoft.Win32.SafeHandles.SafeFileHandle.Open(String fullPath, FileMode mode, FileAccess access, FileShare share, FileOptions options, Int64 preallocationSize)
at System.IO.Strategies.OSFileStreamStrategy…ctor(String path, FileMode mode, FileAccess access, FileShare share, FileOptions options, Int64 preallocationSize)
at System.IO.Strategies.FileStreamHelpers.ChooseStrategy(FileStream fileStream, String path, FileMode mode, FileAccess access, FileShare share, Int32 bufferSize, FileOptions options, Int64 preallocationSize)
at System.IO.StreamWriter.ValidateArgsAndOpenPath(String path, Boolean append, Encoding encoding, Int32 bufferSize)
at System.IO.File.WriteAllText(String path, String contents)
at System.IO.Abstractions.FileWrapper.WriteAllText(String path, String contents)
at UiPath.Studio.Plugin.Git.Services.RepositoryConfig.EnsureGlobalConfig()
at UiPath.Studio.Plugin.Git.Services.RepositoryConfig.EnsureDefaultBranch()
at UiPath.Studio.Plugin.Git.Desktop.Services.AddProjectUiService.AddCurrentProject_ExecuteCore(String projectDir)
at UiPath.Studio.SourceControl.Shared.Desktop.Services.BaseAddProjectUiService1.AddCurrentProject_Execute() at UiPath.Studio.SourceControl.Shared.Desktop.Services.BaseAddProjectUiService1.b__16_0()
at UiPath.Studio.App.Desktop.MVVM.Commands.TaskCommand`3.Execute(TExecuteParameter parameter, Boolean ignoreCanExecuteCheck)
at System.Threading.Tasks.Task.<>c.b__128_0(Object state)
at System.Windows.Threading.ExceptionWrapper.InternalRealCall(Delegate callback, Object args, Int32 numArgs)
at System.Windows.Threading.ExceptionWrapper.TryCatchWhen(Object source, Delegate callback, Object args, Int32 numArgs, Delegate catchHandler), HResult -2147024891

Hey!

Welcome to community!

Try this:

Studio->Teams->GitInit

Try this and let me know

Regards,
NaNi

even there its not enabled

That means you’ve already initialized…

Kindly check your repository Path…

Try to Disconnect and Connect again

Regards,
NaNi

Hello @pkumar13 - Can you try opening the same file from your documents folder and see how it goes. Please share the screenshot of your git in UiPath

Hi…

please refer to the attached screenshot below.

image.png

Regards…
Praveen

Hello @pkumar13

Please check the below video and the similar post.

Is there any .git folder in the project?

Thanks

Check if you installed this prerequisite first: https://aka.ms/vs/17/release/vc_redist.x64.exe

After you installed it, restart the Studio machine, and retry to see if the GIT is enabled in the Studio->Teams->GitInit

Hi @pkumar13

Check out the docs

Have you tried like this → Studio->Teams->Git Init

Regards
Gokul

git init is not enabled for me…
i can’t try the above steps

Regards…
Praveen

tried that also… but it sayd access to path c:\users\pkumar13.gitconfig is denied

git init is enabled in path mentioned under teams git init, but when i click on git init, i am getting access denied to .gitconfig error message

yes i have tried like this → Studio->Teams->Git Init
getting below mentioned error message

please help me resolve thus issue, not able to continue to work, its a blocker

Hi @pkumar13

Try to restart the UiPath studio

Check out the video link

Regards
Gokul

have checked above attached video also, but when i click on teams-git init i am getting below error message

i am stuck at git init step


getting above error message

But if you are removing that file (.gitconfig), it will allow you to recreate it via UiPath Studio at the Git init?

we tried that also… by removing .gitconfig file, even getting same error message

Can you give access to Everyone on that particular file via Properties → Security?

@pkumar13

Can you try to move only the workflows to another project and open it from there?
Then try to do the git init. It should work.

Else remove the current git connection in the folder by deleting the git folder.

Thanks