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, please help. What is the right way to clone the submodules in an existing repository?
djrecker$ git submodule update --init --recursive
Submodule 'Path' ([email protected]:Path) registered for path 'App'
Cloning into 'Path'...
Permission denied (publickey).
fatal: Could not read from remote repository.
I was facing the same issue. The problem was on your github repo , you might be using some old ssh key.
You need to update the current ssh key.
Steps involved are:
1. vim ~/.ssh/id_rsa.pub
2. copy the ssh key
3. Go to the github settings
4. Select the option ssh keys
5. Remove the old ssh keys not used anymore.
6. Add a new ssh key.
7. Try running the "git submodule update --recursive"
This worked for me !!
In my case, it was complaining about the same issue when I was using a regular command line (Git CMD). Then I tried with Git Bash and no issue no more.
I had this issue. In my case, the public key (~/.ssh/id_rsa.pub) wasn't set up on the server properly.
Reference: Git update submodules recursively
# This must be called twice. Once for new and once for existing submodules.
git submodule update --init --recursive
git submodule update --recursive
ssh -vT [email protected]
. Ensure the key you set up is listed there. For more help on permissions issues, follow this guide:
https://help.github.com/articles/error-permission-denied-publickey/
.gitmodules
in the project root folder and ensure things look okay. As recommended by @VonC try cloning them in a separate folder.In my case the issue was caused by console which did not ask me for a password. Solution was to change the console from CMDER to Gitbash. When I used CMDER it does not show the password window which caused this access denied issue.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With