Search code examples
gitauthenticationgit-stash

Git require credentials on submodules


I have some troubles with Git.

I have repo (RepoA) that used another repo as submodule(RepoB). both of them are hosted on same server.

Git server managing under Stash.

I added same ssh key for both projects (Deployment key).

If I cloning RepoB, all is OK If I cloning Repo A(without cloning submodules), all is OK too, but when I call git submodule update than I getting request for password for user git.

What I'm doing wrong?


Solution

  • I found mistake. Many thanks to @VonC for question that which sent me to the right path.

    Path to RepoB was git@server/path-to-repo but correct was ssh://git@server/path-to-repo. If I understood correctly when I set wrong path git tried to get repo by HTTP protocol, and required credentials