简体   繁体   English

使用github部署时,未设置git_discovery_across_filesystem

[英]Deploying with github, git_discovery_across_filesystem not set

I've seen many threads and blog posts about my problem but none of them solved my problem, so I'll ask here if anyone has encountered the same problem. 我已经看到许多有关我的问题的主题和博客文章,但是都没有一个解决我的问题的,所以我将在这里询问是否有人遇到过同样的问题。

I'm attempting to deploy my website via github. 我正在尝试通过github部署我的网站。 I have created a bare hub.git repo on the server, I push my local git repo to it, checked if it worked with a git log and everything was fine. 我在服务器上创建了一个裸露的hub.git repo,我将本地git repo推送到了它,检查它是否与git log一起使用,一切都很好。

I then cloned this repo on the server in a repo called dev and made a virtual host for it and everything shows up fine. 然后,我将这个存储库克隆到服务器上名为dev的存储库中,并为其创建了虚拟主机,一切正常。

I used to push from local to hub and then pull hub from dev and it worked fine. 我以前从本地推送到中心,然后从开发人员拉到中心,效果很好。 I wanted to automate this, I wanted to be able to push from local to hub and automatically pull hub from dev. 我想使它自动化,我希望能够从本地推送到集线器并自动从开发者那里拉集线器。 So I created a post-update file in hub.git/hooks and put this in it : 因此,我在hub.git / hooks中创建了一个更新后的文件,并将其放入其中:

    #!/bin/bash
echo
echo "***** updating on dev *****"
echo 
cd /../dev || exit
unset GIT_DIR
git pull origin master

I then made sure that my post-update was executable with a 然后,我确保更新后的可执行文件带有

   chmod +x hooks/post-update

Went back to my local repo, changed a file 回到我的本地仓库,更改了文件

   git add .
   git commit -m "testing"
   git push origin

This message comes up 此消息出现

   remote : 
   remote : ***** updating on dev *****
   remote : 
   remote : fatal: Not a git repository (or any parent up to mount point /dev)
   remote : Stopping at filesystem boundary (GIT_DISCOVERY_ACROSS_FILESYSTEM not set).

I checked and there is a .git in my dev directory and the HEAD hasn't been renamed or anything. 我检查了一下,在我的dev目录中有一个.git,并且HEAD尚未重命名或执行任何操作。 However I do have a HEAD, a FETCH_HEAD and a ORIGIN_HEAD (don't know if that would change anything). 但是我确实有一个HEAD,一个FETCH_HEAD和一个ORIGIN_HEAD(不知道这是否会改变任何东西)。

I'm not sure what the problem is here. 我不确定这是什么问题。 The server is a gentoo x86 (if that might help at all). 该服务器是gentoo x86(如果有帮助的话)。 Sorry if I'm just missing something obvious or if this isn't the place to post this. 很抱歉,如果我只是缺少明显的东西,或者这不是发布此内容的地方。

replacing cd /../dev by cd ../dev should help. 更换cd /../dev通过cd ../dev应该有所帮助。

If not, try echo $(pwd) to see where you are in the output 如果不是,请尝试echo $(pwd)看看您在输出中的位置

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 GIT_DISCOVERY_ACROSS_FILESYSTEM 未设置 - GIT_DISCOVERY_ACROSS_FILESYSTEM not set 在文件系统边界停止(未设置GIT_DISCOVERY_ACROSS_FILESYSTEM) - Stopping at filesystem boundary (GIT_DISCOVERY_ACROSS_FILESYSTEM not set) Heroku - 在文件系统边界停止(未设置GIT_DISCOVERY_ACROSS_FILESYSTEM) - Heroku - Stopping at filesystem boundary (GIT_DISCOVERY_ACROSS_FILESYSTEM not set) 运行作曲家更新时未设置GIT_DISCOVERY_ACROSS_FILESYSTEM - GIT_DISCOVERY_ACROSS_FILESYSTEM not set when running composer update GIT_DISCOVERY_ACROSS_FILESYSTEM 错误 - GIT_DISCOVERY_ACROSS_FILESYSTEM error Python:致命:不是 git 存储库在文件系统边界停止(未设置 GIT_DISCOVERY_ACROSS_FILESYSTEM) - Python: fatal: not a git repository Stopping at filesystem boundary (GIT_DISCOVERY_ACROSS_FILESYSTEM not set) 设置 GIT_DISCOVERY_ACROSS_FILESYSTEM 以允许服务访问存储在符号链接下的 git repo - Set GIT_DISCOVERY_ACROSS_FILESYSTEM to allow service to access git repo stored under a symlink GIt 致命:不是 git 存储库(或安装点 /home 之前的任何父存储库)在文件系统边界处停止(未设置 GIT_DISCOVERY_ACROSS_FILESYSTEM) - GIt fatal: Not a git repository (or any parent up to mount point /home) Stopping at filesystem boundary (GIT_DISCOVERY_ACROSS_FILESYSTEM not set) 使用终端和MacFusion时出现GIT_DISCOVERY_ACROSS_FILESYSTEM问题 - GIT_DISCOVERY_ACROSS_FILESYSTEM problem when working with terminal and MacFusion 使用Git / Github进行部署 - Deploying with Git/Github
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM