Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/github/3.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Git 尝试部署站点-部署失败错误_Git_Github_Deployment - Fatal编程技术网

Git 尝试部署站点-部署失败错误

Git 尝试部署站点-部署失败错误,git,github,deployment,Git,Github,Deployment,我正在尝试部署我的站点,但出现以下错误: 2:49:12 PM: Error checking out submodules: fatal: No url found for submodule path 'startbootstrap-grayscale' in .gitmodules 2:49:12 PM: Failing build: Failed to prepare repo 2:49:12 PM: failed during stage 'preparing repo': Error

我正在尝试部署我的站点,但出现以下错误:

2:49:12 PM: Error checking out submodules: fatal: No url found for submodule path 'startbootstrap-grayscale' in .gitmodules
2:49:12 PM: Failing build: Failed to prepare repo
2:49:12 PM: failed during stage 'preparing repo': Error checking out submodules: fatal: No url found for submodule path 'startbootstrap-grayscale' in .gitmodules
一切都已承诺,并推高到我的回购,我不认为有任何遗漏。有什么线索说明可能出了什么问题吗

编辑

[core]
repositoryformatversion = 0
filemode = true
bare = false
logallrefupdates = true
ignorecase = true
precomposeunicode = true

[remote "origin"]
  url = https://github.com/BlackrockDigital/startbootstrap-grayscale.git
  fetch = +refs/heads/*:refs/remotes/origin/*
[branch "master"]
  remote = origin
  merge = refs/heads/master
编辑2

usage: git submodule [--quiet] add [-b <branch>] [-f|--force] [--name <name>] [--reference <repository>] [--] <repository> [<path>]
   or: git submodule [--quiet] status [--cached] [--recursive] [--] [<path>...]
   or: git submodule [--quiet] init [--] [<path>...]
   or: git submodule [--quiet] deinit [-f|--force] (--all| [--] <path>...)
   or: git submodule [--quiet] update [--init] [--remote] [-N|--no-fetch] [-f|--force] [--checkout|--merge|--rebase] [--[no-]recommend-shallow] [--reference <repository>] [--recursive] [--] [<path>...]
   or: git submodule [--quiet] summary [--cached|--files] [--summary-limit <n>] [commit] [--] [<path>...]
   or: git submodule [--quiet] foreach [--recursive] <command>
   or: git submodule [--quiet] sync [--recursive] [--] [<path>...]
   or: git submodule [--quiet] absorbgitdirs [--] [<path>...]
用法:git子模块[--quiet]添加[-b][-f |--force][--name][--reference][--]
或者:git子模块[--quiet]状态[--cached][--recursive][--][…]
或者:git子模块[--quiet]init[--][…]
或者:git子模块[--quiet]deinit[-f |--force](-all |[--])
或者:git子模块[--quiet]更新[--init][--remote][N |--no fetch][f |--force][--checkout |--merge |--rebase][--[no-]建议浅层][--reference][--recursive][--]
或者:git子模块[--quiet]摘要[--cached |--files][--summary limit][commit][--][…]
或者:git子模块[--quiet]foreach[--recursive]
或:git子模块[--quiet]同步[--recursive][--][…]
或者:git子模块[--quiet]absorbgitdirs[--][…]
你从“heroku日志——尾巴”中得到了什么? 我假设你删除了应用程序并重新部署?

你从“heroku日志--尾巴”中得到了什么?
我假设你删除了应用并重新部署了?

看起来你的存储库使用了一个子模块。使用子模块时,存储库根目录中的
.gitmodules
文件中应该有该路径的条目,并且该文件中应该有URL的条目。如果缺少文件或正确的URL条目,则在执行克隆时将无法签出子模块,因为Git不知道另一个存储库在哪里

作为参考,
.gitmodules
文件应如下所示:

[submodule "vim-fugitive"]
        path = vim/bundle/vim-fugitive
        url = https://github.com/tpope/vim-fugitive.git
[submodule "ctrlp"]
        path = vim/bundle/ctrlp
        url = https://github.com/kien/ctrlp.vim.git
path
组件是存储库中的路径,
url
组件是下载它的位置


有关子模块配置选项的更多详细信息,请参见
git config(1)
手册页。

您的存储库似乎使用了子模块。使用子模块时,存储库根目录中的
.gitmodules
文件中应该有该路径的条目,并且该文件中应该有URL的条目。如果缺少文件或正确的URL条目,则在执行克隆时将无法签出子模块,因为Git不知道另一个存储库在哪里

作为参考,
.gitmodules
文件应如下所示:

[submodule "vim-fugitive"]
        path = vim/bundle/vim-fugitive
        url = https://github.com/tpope/vim-fugitive.git
[submodule "ctrlp"]
        path = vim/bundle/ctrlp
        url = https://github.com/kien/ctrlp.vim.git
path
组件是存储库中的路径,
url
组件是下载它的位置


有关子模块配置选项的更多详细信息,请参见
git config(1)
手册页。

我知道这个问题很久以前就被提出了。以防万一。 Netlify在一篇社区支持帖子中描述了这个错误的原因,他们说的底线是“如果你有一个私有子模块,你需要为我们的构建系统授予访问你的私有子模块的权限”

根据Netlify对解决方案的描述,我做了以下工作:

  • 我从Netlify上的项目设置创建了一个部署密钥,并将其添加到 部署密钥下的子模块设置
  • 在推到github并在Netlify上启动构建之后,我得到了与问题中描述的相同的错误
  • 我改变了
    https://github.com/user/repo
    git@github.com:user/repo
    .gitmodules
    中,我再次按下,构建和delpoyment工作正常

  • 我知道这个问题很久以前就被问过了。以防万一。 Netlify在一篇社区支持帖子中描述了这个错误的原因,他们说的底线是“如果你有一个私有子模块,你需要为我们的构建系统授予访问你的私有子模块的权限”

    根据Netlify对解决方案的描述,我做了以下工作:

  • 我从Netlify上的项目设置创建了一个部署密钥,并将其添加到 部署密钥下的子模块设置
  • 在推到github并在Netlify上启动构建之后,我得到了与问题中描述的相同的错误
  • 我改变了
    https://github.com/user/repo
    git@github.com:user/repo
    .gitmodules
    中,我再次按下,构建和delpoyment工作正常

  • 我在构建阶段使用netlifyit,它开始构建,然后返回此错误我在构建阶段使用netlifyit,它开始构建,然后返回此错误感谢,我刚刚发现这就是问题所在,问题是,不确定如何修复请查看编辑,看看我需要更改什么,它指向远程源文件中的url。您正在向我们显示
    .git/config
    文件。我们需要看到的是存储库中
    .gitmodules
    文件的内容。我在任何地方都看不到该文件,是否可能是此文件夹中没有该文件?如果您有子模块,则需要在存储库的根目录中有一个。如果您缺少一个,您可以添加一个带有
    git子模块add-f
    的。感谢您,我刚刚发现这就是问题所在,问题是,不确定如何修复它。请查看编辑并查看我需要更改的内容,它指向远程源文件中的url。您正在向我们显示
    .git/config
    文件。我们需要看到的是存储库中
    .gitmodules
    文件的内容。我在任何地方都看不到该文件,是否可能是此文件夹中没有该文件?如果您有子模块,则需要在存储库的根目录中有一个。如果您缺少一个,您可以使用git子模块add-f添加一个。我仍然会犯同样的错误。我使用的是git@url模式。我不确定我遗漏了什么。我复制了公钥并将其放入gitlab。我仍然会犯同样的错误。我是你