Fatal Error when updating submodule using GIT

后端 未结 8 1057
庸人自扰
庸人自扰 2021-01-30 08:45

I am trying to update the submodules of this git repositary but I keep getting a fatal errors:

[root@iptlock ProdigyView]# git submodule update --recursive
Cloni         


        
8条回答
  •  粉色の甜心
    2021-01-30 09:31

    Adding new answer instead of edit for greater visibility to anyone experience the same problem I was...

    I had the exact opposite. Private Bitbucket repo & submodule for work. Always got this error...

    fatal: repository 'http://bitbucket.org/companyname/submodule-repo-name.git' does not exist
    fatal: clone of 'http://bitbucket.org/companyname/submodule-repo-name.git' into submodule path 
    '/Users/me/path/to/repo-using-submodule/folder' failed
    Failed to clone 'submodule/folder'. Retry scheduled
    fatal: repository 'http://bitbucket.org/companyname/submodule-repo-name.git' does not exist
    fatal: clone of 'http://bitbucket.org/companyname/submodule-repo-name.git' into submodule path 
    '/Users/me/path/to/repo-using-submodule/folder' failed
    Failed to clone 'submodule/folder' a second time, aborting
    

    I had to manually go into my .git/config file and update this:

    [submodule "submodule-name"]
    url = https://bitbucket.org/companyname/submodule-repo.git
    

    with this:

    [submodule "submodule-name"]
    url = git@bitbucket.org:companyname/submodule-repo.git
    

    Not sure how to set this up so me and all my coworkers can use the submodule without tweaking, but got me past my several month long struggle with this.

提交回复
热议问题