Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fetch doesn't work in repository on windows share. #1260

Closed
1 task done
fsylla opened this issue Aug 7, 2017 · 9 comments
Closed
1 task done

Fetch doesn't work in repository on windows share. #1260

fsylla opened this issue Aug 7, 2017 · 9 comments

Comments

@fsylla
Copy link

fsylla commented Aug 7, 2017

  • I was not able to find an open or closed issue matching what I'm seeing

Setup

  • Which version of Git for Windows are you using? Is it 32-bit or 64-bit?
$ git --version --build-options

git version 2.13.3.windows.1
built from commit: faaf2320f32f6ac52a69502c6b157b6ea4781f50
sizeof-long: 4
machine: x86_64


 - Which version of Windows are you running? Vista, 7, 8, 10? Is it 32-bit or 64-bit?

$ cmd.exe /c ver

Microsoft Windows [Version 6.1.7601]

  • What options did you set as part of the installation? Or did you choose the
    defaults?
# One of the following:
> type "C:\Program Files\Git\etc\install-options.txt"
> type "C:\Program Files (x86)\Git\etc\install-options.txt"
> type "%USERPROFILE%\AppData\Local\Programs\Git\etc\install-options.txt"
$ cat /etc/install-options.txt

Path Option: BashOnly
SSH Option: OpenSSH
CURL Option: OpenSSL
CRLF Option: CRLFCommitAsIs
Bash Terminal Option: MinTTY
Performance Tweaks FSCache: Enabled
Use Credential Manager: Enabled
Enable Symlinks: Disabled



 - Any other interesting things about your environment that might be related
   to the issue you're seeing?

** insert your response here **

### Details

 - Which terminal/shell are you running Git from? e.g Bash/CMD/PowerShell/other

bash

 - What commands did you run to trigger this issue? If you can provide a
   [Minimal, Complete, and Verifiable example](http://stackoverflow.com/help/mcve)
   this will help us understand the issue.

** insert your commands here **
cd into top level of repository containing .git
git fetch

  • What did you expect to occur after running these commands?

download from remote origin

  • What actually happened instead?

Error message
fatal: Not a git repository (or any of the parent directories): .git

Additional problem:
git status doesn't work in top level directoy but in it's subdirectories.

  • If the problem was occurring with a specific repository, can you provide the
    URL to that repository to help us with testing?

** insert URL here **

This problem didn't occur in Git for Windows 2.12.2.2

@dscho
Copy link
Member

dscho commented Aug 7, 2017

This description is highly unclear and even a cursory attempt at replicating this issue finds no Git bug.

Feel free to provide substantially more information.

@fsylla
Copy link
Author

fsylla commented Aug 8, 2017

Please see the bash console log below.
I'm working on host MD1APWHC in a repository that is shared from host md164x2c.
In the top level directory it doesn't appear to be an repository at all (see git status).
If I change into the bin directory, some git commands work as expected but fetch still fails.

`
adiiacm1@MD1APWHC MINGW64 //md164x2c/jfw
$ ls -a
./ ../ .git/ .gitignore bin/ Check_s7p_rights/ Jenkins/ JobFramework/ Perl/ TFSAdmin/

adiiacm1@MD1APWHC MINGW64 //md164x2c/jfw
$ git status
fatal: Not a git repository (or any of the parent directories): .git

adiiacm1@MD1APWHC MINGW64 //md164x2c/jfw
$ cd bin

adiiacm1@MD1APWHC MINGW64 //md164x2c/jfw/bin ((S7PCPU_TOOLS_JFW_5.00))
$ ls -a
./ ../ golem* golem.cmd rama* rmtshare.exe* rshareperm.cmd setsvcpasswd.cmd tfsgroup.exe*

adiiacm1@MD1APWHC MINGW64 //md164x2c/jfw/bin ((S7PCPU_TOOLS_JFW_5.00))
$ git status
HEAD detached at S7PCPU_TOOLS_JFW_5.00
nothing to commit, working tree clean

adiiacm1@MD1APWHC MINGW64 //md164x2c/jfw/bin ((S7PCPU_TOOLS_JFW_5.00))
$ git remote -v
origin https://venus.tfs.siemens.net/tfs/TIA/S7P/_git/cm.tools.git (fetch)
origin https://venus.tfs.siemens.net/tfs/TIA/S7P/_git/cm.tools.git (push)

adiiacm1@MD1APWHC MINGW64 //md164x2c/jfw/bin ((S7PCPU_TOOLS_JFW_5.00))
$ git fetch
fatal: Not a git repository (or any of the parent directories): .git
error: https://venus.tfs.siemens.net/tfs/TIA/S7P/_git/cm.tools.git did not send all necessary objects

fatal: Not a git repository (or any of the parent directories): .git

`

@kostix
Copy link

kostix commented Aug 8, 2017

@fsylla several random points:

  • Does the contents of that ".git" directory really look like it's a Git database?
  • Do you have correct permissions on its contents?
  • What happens if you export GIT_DIR=//md164x2c/jfw/.git into your shell's environment and retry?

@dscho
Copy link
Member

dscho commented Aug 8, 2017

I tried to reproduce the issue by cd //localhost/c$/git-sdk-64/usr/src/build-extra with Git for Windows v2.14.0(2) and then running git status. It works here.

@fsylla
Copy link
Author

fsylla commented Aug 8, 2017

@kostix
export GIT_DIR=//md164x2c/jfw/.git makes the problem disappear!
My permissions are correct and the repository works as expected as long as I use it locally on md164x2c (without the path of the share).

@kostix
Copy link

kostix commented Aug 8, 2017

It might mean some weird problem with the Git's logic used to figure out where the repository's Git database resides (that's why I asked for that test).

The idea is that when you force the location of the database, that algorythm is not exersized.

@fsylla
Copy link
Author

fsylla commented Aug 9, 2017

@dscho
The shell script attached requires admin privileges to create a share named repo.
It assumes d: is writable and tries to create a Repository in d:\tst\repo

sharepo.zip

@dscho
Copy link
Member

dscho commented Oct 23, 2017

I think that the problem here was the top-level of the UNC directory, and that I managed to fix it in response to #1320. Git for Windows v2.14.3 will come out later today, with the fix, please keep an eye open and test whether this fixes your issue, too.

@fsylla
Copy link
Author

fsylla commented Oct 25, 2017

Yes, it does. V2.14.3 behaves as expected. Thank you!

@fsylla fsylla closed this as completed Oct 25, 2017
@dscho dscho added this to the v2.14.3 milestone Oct 25, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants