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.