Reputation: 1766
I want to create a remote repo in a network place with Windows name \\company.net\dumptruck\repos\MyRepo
by using SourceTree. I have read around but I haven't found a solution to my case. Here is what I have done.
\\company.net\dumptruck\repos\
and //company.net/dumptruck/repos/
as path. In both the cases I got the error fatal: unable to get current working directory: No error
C:\Somewhere\MyRepo
in order to be able to open the terminal. Then, I issued cd //company.net/dumptruck/repos/
followed by git init --bare
. I get the same error as before: fatal: unable to get current working directory: No error
Note that I can reach the folder //company.net/dumptruck/repos/
pwd
and echo $PWD
provide //company/dumptruck/repos/
Any hint?
Upvotes: 2
Views: 1982
Reputation: 1766
I continue the discussion here since I am not allowed to write in the comments box (too many characters).
Both the commands pwd
and echo $PWD
provide //company.net/dumptruck/repos/
. Sorry, my bad in my previous comment.
Nevertheless, I tried to issue the following commands from GitForWindows and from the terminal provided by SourceTree (that should be MINGW32):
cd '//company.net/dumptruck/repos/'
git init --bare
In both the cases I got
error: unable to create directory for //company.net/dumptruck/repos/HEAD
I asked a colleague of mine to perform the same with his client (he uses Cygwin). Everything seemed to work smoothly.
In reality, I am allowed to clone the repo, but I am not allowed to push into it. I guess the problem may rely either on the permission or on the path. We adjust the permissions, but the problem was still there.
All the problems got solved by mapping the network location into a network drive. I personally don't like using network drives and I wonder if there is a way for making everything to work just by using network location names.
Upvotes: 1
Reputation: 6120
Do you have enough rights to read and write to these directories? You may have to run these as administrator.
Upvotes: 0