I am not able to clone the submodule existing within my private git repository. I do have access to entire repository,
Have used the below commands but dint work, pleas
Had the same problem with TortoiseGit / Windows subsystem for Linux / GitBash. The solution is to use authentication via an agent (key) instead of password.
For TortoiseGit:
(without pageant git clone it asks for password and works as intended, but git update fails with error)
For WS4L:
$ eval `ssh-agent -s`
$ chmod 600 /path/to/key
$ ssh-add /path/to/key
proceed with git submodule update
Win10 + git bash terminal in VS Code. In my case, I was using git bash through VS Code. When using submodules, git pops up a window to enter pass phrase for the key. Bash through VSCode would't pop this up. With the windows Context menu item, "Git Bash Here" in the repo folder as shown below: Context menu Screen Grab
git submodule update
works splendidly.
Interestingly, in a similar occasion using the HTTPS link worked for me.