无法创建git子模块-远程:未找到

用户691197

使用git bash创建git子模块时,出现以下错误

$ git submodule add  https://github.com/******/my-repo/my-app 
Cloning into 'D:/my-repo/my-app'...
remote: Not Found
fatal: repository 'https://github.com/*******/my-repo/my-app/' not found
fatal: clone of 'https://github.com/*******/my-repo/my-app' into submodule path 'D:/my-repo/my-app' failed

以下是我的.git / config文件

$ cat .git/config
[core]
        repositoryformatversion = 0
        filemode = false
        bare = false
        logallrefupdates = true
        symlinks = false
        ignorecase = true
[remote "origin"]
        url = https://github.com/*******/my-repo.git
        fetch = +refs/heads/*:refs/remotes/origin/*
[branch "master"]
        remote = origin
        merge = refs/heads/master

我能够从github克隆my-repo,但是在克隆后尝试添加子模块时,我看到此错误。我是否应该在github中为my-app子模块单独创建一个存储库,以便能够将其添加为另一个存储库(my-repo)中的子模块?

或者,我在这里缺少任何配置吗?

PS:我正在关注此链接-https: //git-scm.com/book/en/v2/Git-Tools-Submodules

我是否应该在github中为my-app子模块单独创建一个存储库,以便能够将其添加为另一个存储库(my-repo)中的子模块

是。

https://github.com/******/my-repo/my-app不是要克隆的Git存储库的URL。
它是现有存储库的子文件夹的URL(即:)https://github.com/*******/my-repo.git

拥有myapp自己的存储库是能够将其作为子模块添加到另一个存储库的先决条件。

本文收集自互联网,转载请注明来源。

如有侵权,请联系 [email protected] 删除。

编辑于
0

我来说两句

0 条评论
登录 后参与评论

相关文章

Git子模块添加:“在本地找到git目录”的问题

为什么rust无法在子模块中找到功能?

zipimporter无法找到/加载子模块

git子模块的多个URL-每个远程子模块

Github页面,远程引导CSS:无法加载资源:服务器以404(未找到)状态响应

git plumbing命令使子模块远程

在没有远程的情况下创建git子模块

Spark未找到命名的模块

webpack模块未找到问题

git子模块更新-远程vs git pull

Git子模块添加:“在本地找到git目录”的问题

请求无法完成(未找到)

Phonegap创建项目错误-“未找到模块”

无法进行地理编码,并引发错误为“远程服务器返回错误:(404)未找到”

git子模块更新-远程不起作用

安装程序 | 提取的exe无法找到子模块

未找到模块:zipline 导入

scipy 模块未找到错误

未找到或无法识别表单

无法通过传递使用子模块找到 lib

在远程服务器上进行 git pull 时,Fabric 2 自动部署错误。未找到存储库

uid:无法进行端口转发:使用intellij idea进行远程调试时未找到socat

未找到 Paramiko 模块

Bamboo + Git Azure DevOps =“致命:无法从远程存储库读取。”。对于 Git 子模块

git:将子模块分支重置为远程标签

Git 子模块:[email protected]:权限被拒绝(公钥)。致命:无法从远程存储库读取

无法计算缓存键:“/dist”未找到:未找到

未找到模块:无法解析“firebase”

VUE - 未找到模块。无法导入组件