Reputation: 2064
When retrieving source code on this particular project, I use this syntax:
git clone https://ALerner@path_to_the_gitfile.git
I was told to explicitly use credentials as specified above, otherwise I dont have access to the source.
This time around, I have to run this command afterwards:
git submodule update --init --recursive --remote --merge
I went into .gitmodules file, and replaced this syntax:
[submodule "src/grpc-proto"]`enter code here`
path = src/grpc-proto
url = git@path_to_the_gitfile.git
branch = .
with this one:
url = https://ALerner@path_to_the_gitfile.git
But now, instead of getting "Access denied" type errors which I was getting before making these credential related changes, I am now getting:
Cloning into '/home/alex/go-projects/src/gitlab.n-t.io/webback/developtools'...
fatal: unable to access 'https://gitlab.n-t.io:sdexnt/developtools-back.git/': URL using bad/illegal format or missing URL
fatal: clone of 'https://[email protected]:sdexnt/developtools-back.git' into submodule path '/home/alex/go-projects/src/gitlab.n-t.io/webback/developtools' failed
Failed to clone 'developtools'. Retry scheduled
So what syntax do I need to use in .gitmodules file to incorporate my login credential when specifying various submodule paths ?
thank you
Upvotes: 0
Views: 133
Reputation: 94726
HTTP URL syntax is different from scp-like. This is the correct URL:
https://gitlab.n-t.io/sdexnt/developtools-back.git
(/
instead of :
)
See the docs at https://git-scm.com/docs/git-fetch#_git_urls
Upvotes: 1