Unable to clone from the given repository


image
image

Hi @russbel,

Can you please the detailed logs for the GIt issue?
I have tried this a couple of time before and it works fine.Just wondering if this could be due to access restrictions.

@russbel, I got the same error (detail is LibGit2Sharp.CheckoutConflictException: 1 conflict prevents checkout)

** I could only post 1 image as a new user, sorry, had to delete the others - I hope the post makes sense) **

The way I replicated it is that when I first cloned your repo, I got a pop-up:
No UiPath Studio Project was found in …

Then I saw this OPEN box: (Which is trying to have you manually Open the project)

Which I cancelled. When I tried to Clone again, it says “check out is not empty”

From there I navigate to the checkout folder, see the .git folder, and delete it, and click “Select Folder”

Then I get that error:
image

This is because, there is a file still left in there README.md (containing the word Leeme -Spanish for Readme?)

So, I think its working - and you get that initial issue b/c on Clone of the repo, UiPath wants to load up the project.json file (which you don’t have in your repo yet)

EDIT: So the conflict being that the README.md was already there.
EDIT2: So check you checkout folder, you should see you file there (I do)

Was this the issue you were facing? If so, please mark this as ‘solved’. If not, can you post additional details?

@Indrajit_Banerjee I am getting the error of access denied. How can it be resolved ?

---> LibGit2Sharp.LibGit2SharpException: could not open 'Y://.gitconfig': Access is denied.

Error details ::

19.6.0+Branch.master.Sha.adf20656f41da84cdec5e5620b62276717eb7319

Unable to clone from the given repository. Please make sure that the remote is available and try again.

GIT: UiPath.Studio.Contracts.RecoverableException: Unable to clone from the given repository. Please make sure that the remote is available and try again. ---> LibGit2Sharp.LibGit2SharpException: could not open 'Y://.gitconfig': Access is denied.

   at LibGit2Sharp.Core.Ensure.HandleError(Int32 result)
   at LibGit2Sharp.Core.Proxy.git_clone(String url, String workdir, GitCloneOptions& opts)
   at LibGit2Sharp.Repository.Clone(String sourceUrl, String workdirPath, CloneOptions options)
   at UiPath.Studio.Plugin.Git.Wrappers.RepositoryInit.Clone(String sourceUrl, String workdirPath, CloneOptions options)
   at UiPath.Studio.Plugin.Git.Services.Core.CloneService.<>c__DisplayClass3_0.<CheckoutCore>b__0()
   at UiPath.Studio.Plugin.Git.Services.UI.UiAuthenticationSession.Execute[T](Func`1 action)
   at UiPath.Studio.Plugin.Git.Services.Core.CloneService.CheckoutCore(String uri, String localFolder, IAuthenticationSession authenticationSession)
   --- End of inner exception stack trace ---
   at UiPath.Studio.Plugin.Git.Services.Core.CloneService.CheckoutCore(String uri, String localFolder, IAuthenticationSession authenticationSession)
   at UiPath.Studio.Plugin.Git.Services.Core.CloneService.<>c__DisplayClass2_0.<Checkout>b__0()
   at System.Threading.Tasks.Task.InnerInvoke()
   at System.Threading.Tasks.Task.Execute()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at UiPath.Studio.Plugin.Git.Services.Core.CloneService.<Checkout>d__2.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at UiPath.Studio.Plugin.Git.Services.UI.CheckOutUiService.<CheckOut_ExecuteInternal>d__16.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at UiPath.Studio.SourceControl.Shared.Services.UI.BaseCheckOutUiService`1.<CheckOut_Execute>d__25.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at UiPath.Studio.SourceControl.Shared.Services.UI.BaseCheckOutUiService`1.<<get_CheckOutCommand>b__11_0>d.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at UiPath.Studio.Shared.MVVM.Commands.TaskCommand`3.<Execute>d__32.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.CompilerServices.AsyncMethodBuilderCore.<>c.<ThrowAsync>b__6_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 -2146233088

I think the error explains it - your credentials don’t have access to Y:.gitconfig. Either the drive is no longer mapped or your access to that mapped drive has been revoked.

I suppose in my machine when it tries to clone the repository it created .GIT folder and then create this file. I am not sure how the clone repository from git works. But I have placed correct credentials as well the folder where the repository need to be cloned in the machine is empty in the uipath dialog box.

So I dont get how to assign rights to this file ?

Also I am able to clone this same repository from another home machine.

@JDoshi .gitconfig is a global settings file that was set when git was installed on your local machine. I know when I installed git bash, it defaulted to my “home” folder (H:\my\username).

It may have been, that at install time, the default home or root location was set to the Y: drive.

This may be helpful:

EDIT: To be clear, it is erroring, because each time git is called it’s trying to read from that file - which it seemingly doesn’t have access to.

I dont have “Y” drive in my machine. I guess its some logical drive or something.

Btw I solved this silly mystery of mine. Acutally you need to run UiPath as administrator and then it works fine.

Yes, that would change where git looks for the .gitconfig file.

There’s a workaround. Clone your project in SourceTree to a local folder. It will create .git and .local folders. Now open that project from UiPath Studio. It will be connected automatically.

1 Like

I was having this problem too but have resolved it by:

-Going into DevOps Repository and Cloning the Repository into Visual Studio Code.
-Then Saving my UIPath Project to that Folder
-Restart Applications and it picked up the relevant Git Source.

I got the same error and noticed that the reason was that I had an umlaut in my login credentials. I removed the umlaut from my password and was able to connect to the repository again.

I got the same error, can anyone please help me.

13:07:14.9803 => [ERROR] [UiPath.Studio] [1] GIT: UiPath.Studio.Contracts.RecoverableException: Unable to clone from the given repository. Please make sure that the remote is available and try again.
—> LibGit2Sharp.LibGit2SharpException: failed to mark Git repository folder as hidden:
at LibGit2Sharp.Core.Ensure.HandleError(Int32 result) in C:\work\uipathgit\libgit2sharp\LibGit2Sharp\Core\Ensure.cs:line 156
at LibGit2Sharp.Core.Proxy.git_clone(String url, String workdir, GitCloneOptions& opts) in C:\work\uipathgit\libgit2sharp\LibGit2Sharp\Core\Proxy.cs:line 278
at LibGit2Sharp.Repository.Clone(String sourceUrl, String workdirPath, CloneOptions options) in C:\work\uipathgit\libgit2sharp\LibGit2Sharp\Repository.cs:line 779
at UiPath.Studio.Plugin.Git.Wrappers.RepositoryInit.Clone(String sourceUrl, String workdirPath, CloneOptions options)
at UiPath.Studio.Plugin.Git.Services.CloneService.<>c__DisplayClass3_0.b__0()
at UiPath.Studio.Plugin.Git.Desktop.Services.UiAuthenticationSession.Execute[T](ExecuteArgs1 args) at UiPath.Studio.Plugin.Git.Services.CloneService.CheckoutCore(String uri, String localFolder, IAuthenticationSession authenticationSession) --- End of inner exception stack trace --- at UiPath.Studio.Plugin.Git.Services.CloneService.CheckoutCore(String uri, String localFolder, IAuthenticationSession authenticationSession) at UiPath.Studio.Plugin.Git.Services.CloneService.<>c__DisplayClass2_0.<Checkout>b__0() at System.Threading.ExecutionContext.RunFromThreadPoolDispatchLoop(Thread threadPoolThread, ExecutionContext executionContext, ContextCallback callback, Object state) --- End of stack trace from previous location --- at System.Threading.Tasks.Task.ExecuteWithThreadLocal(Task& currentTaskSlot, Thread threadPoolThread) --- End of stack trace from previous location --- at UiPath.Studio.Plugin.Git.Services.CloneService.Checkout(String repository, String localFolder, IAuthenticationSession authenticationSession) at UiPath.Studio.Plugin.Git.Desktop.Services.CheckOutUiService.CheckOut_ExecuteInternal() at UiPath.Studio.SourceControl.Shared.Desktop.Services.BaseCheckOutUiService1.CheckOut_Execute()
at UiPath.Studio.SourceControl.Shared.Desktop.Services.BaseCheckOutUiService1.<get_CheckOutCommand>b__11_0() at UiPath.Studio.App.Desktop.MVVM.Commands.TaskCommand3.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 -2146233088
13:08:06.8769 => [WARN] [UiPath.Studio] [40] Feed https://gallery.uipath.com/api/v3/index.json has been disabled. Reason: Forbidden