Symptom:
In Windows 10, use git clone --recursive https://github.com/ReFRACtor/ABSCO.git to clone the library including submodule to the local, and encounter the following information during execution:
Submodule 'LBLRTM' ([email protected]:AER-RC/LBLRTM.git) registered for path 'LBLRTM'
Submodule 'LNFL' ([email protected]:AER-RC/LNFL.git) registered for path 'LNFL'
Submodule 'common' ([email protected]:AER-RC/common.git) registered for path 'common'
Cloning into 'D:/MyProj/Simulation/ABSCO/LBLRTM'...
[email protected]: Permission denied (publickey).
fatal: Could not read from remote repository.
Please make sure you have the correct access rights
and the repository exists.
fatal: clone of '[email protected]:AER-RC/LBLRTM.git' into submodule path 'D:/MyProj/Simulation/ABSCO/LBLRTM' failed
Failed to clone 'LBLRTM'. Retry scheduled
Cloning into 'D:/MyProj/Simulation/ABSCO/LNFL'...
[email protected]: Permission denied (publickey).
fatal: Could not read from remote repository.
..........................................
Solution:
1) Execute the ssh command:
ssh-keygen -C "[email protected]"
Among them, [email protected] is the email address used to register the github account, and the others are processed according to the default value of continuous carriage return
After the execution is completed, the following results and the storage location of the secret key (usually stored under %USERPROFILE%) will be echoed:
Your identification has been saved in C:\Users\USERNAME/.ssh/id_rsa.
Your public key has been saved in C:\Users\USERNAME/.ssh/id_rsa.pub.
(USERNAME is the username of the currently logged in user)
2) Log in to the github account to set up SSH Keys
visit url
https://github.com/settings/keys
Add SSH Keys
Open C:\Users\USERNAME/ .ssh/id_rsa.pub with a text tool such as Notepad , and paste the content of the public key (as shown in the figure below) into the text box above. Title can be filled in with relevant logos that you think you can identify.
Save it successfully.
3) Re-execute the git clone command
Re-execute the git clone command, the cloned directory and its linked submodules will be successfully cloned locally
Solved a small problem in the previous stage, hereby mark.
Reference Acknowledgments:
https://blog.csdn.net/dwjdj/article/details/117794541
https://blog.csdn.net/wcx1293296315/article/details/88693832