-1

I have no experience with Git. I have to clone a shared folder that I have access to from K: drive into my local drive C:

However whenever I go to C:\GitRepository in Git CMD and I write : git clone K:\GitRepository\Code I get this error :

fatal: 'K:\GitRepository\Code' does not appear to be a git repository
fatal: Could not read from remote repository
Please make sure you have the correct access rights and the repository exists

The repository exists, and all of my workmates were able to clone it into their C drive. I know this question have been asked a lot here, but I have tried all the suggested solutions and still I have the same problem.

McCruise
  • 29
  • 5
  • `cd clone` is wrong .... did you try `git clone` command ? – YesThatIsMyName Oct 18 '21 at 10:58
  • Sorry, just a typo. I have tried git clone – McCruise Oct 18 '21 at 11:01
  • 1
    Is `K:\GitRepository\Code` truly a Git repository? (i.e., if bare, does it contain a `HEAD` file and the required subdirectories? If not bare, does it contain a `.git` containing the `HEAD` file and required subdirectories?) Given that it's easily inspected via the command line, I'd look at it and find out. The most likely problem is that the shared drive either isn't under `K:` or there is some issue with the path on `K:` (access or some other Windows-specific weirdness). – torek Oct 18 '21 at 20:13
  • It is a Git Repository https://i.stack.imgur.com/MhAnZ.png But maybe it's some windows related issue – McCruise Oct 18 '21 at 21:30

1 Answers1

0

You have to remove K:\GitRepository\Code and replace it by your URL remote repository. The full command is this:

cd K:\GitRepository\Code
git clone yourUrlDirection
ZygD
  • 22,092
  • 39
  • 79
  • 102
  • I'm not sure what do you mean by '''yourUrlDirection'''. 'the folder ''K:\GitRepository\Code ''' is shared by the whole company, and to my knowledge there is no URL where to find the project I am trying to clone. – McCruise Oct 18 '21 at 14:27