GIT_DISCOVERY_ACROSS_FILESYSTEM not set

前端 未结 8 1620
忘了有多久
忘了有多久 2020-12-07 14:00

I have searched and read few post but my problem is not the same as descirbed. So here\'s the issue: using git clone into folder under external partition of the disk works f

相关标签:
8条回答
  • 2020-12-07 14:41

    For android source code with repo, I beleive you should use REPO. if you really want to use git, you should know if the project has .git directory with ls -a. Or you have to enter the sub project directory which should include the .git.

    0 讨论(0)
  • 2020-12-07 14:49

    In short, git is trying to access a repo it considers on another filesystem and to tell it explicitly that you're okay with this, you must set the environment variable GIT_DISCOVERY_ACROSS_FILESYSTEM=1

    I'm working in a CI/CD environment and using a dockerized git so I have to set it in that environment docker run -e GIT_DISCOVERY_ACROSS_FILESYSTEM=1 -v $(pwd):/git --rm alpine/git rev-parse --short HEAD\'

    If you're curious: Above mounts $(pwd) into the git docker container and passes "rev-parse --short HEAD" to the git command in the container, which it then runs against that mounted volums.

    0 讨论(0)
提交回复
热议问题