You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Authentication failed cloning public repo containing submodules #2344
bugConfirmed bugs or reports that are very likely to be bugspriority-2Bug that affects more than a few users in a meaningful way but doesn't prevent core functions
When cloning my repo using HTTPS containing two submodules, I receive the following:
This error does not appear when using GitHub Desktop to clone the submodules individually.
This error does not appear when using terminal to clone my repo git clone -recursive https://github.com/erikmartinessanches/javadev.git but git prompts for password twice (for each submodule, how to enable cloning without password?)
@erikmartinessanches thanks for the detailed report (and public repository that demonstrates the issue):
git prompts for password twice (for each submodule, how to enable cloning without password?)
I think this is due to the submodules using SSH remotes (there's a slightly different flow here, which I can write more about after ☕).
As these submodules are public, they can be changed over to HTTPS URLs which will not trigger the authentication steps. Just remember to synchronize the submodules on your machine after the change:
Submodule 'patterns' ([email protected]:erikmartinessanches/patterns.git) registered for path 'patterns'
Cloning into '/Users/shiftkey/Desktop/new/javadev/algorithms'...
ssh_askpass: exec(/usr/X11R6/bin/ssh-askpass): No such file or directory
Host key verification failed.
fatal: Could not read from remote repository.
Please make sure you have the correct access rights
and the repository exists.
It looks like our setup for prompting for credentials falls through to some random defaults when it encounters an SSH remote. Not sure if we need to opt in SSH_ASKPASS as per these docs or something else.
As a workaround you could change these entries to be HTTPS URLs, which will bypass the need to invoke SSH for cloning the submodules which seems to have issues unless you have configured SSH credentials.
Hello @erikmartinessanches,
I faced the exact same issue, for me even terminal was not working.
This was after my repo was configured to target HTTPS url and not SSH.
As i workaround i deleted the stored credentials (windows) :
Credentials Manager -> Manage windows credentials -> delete all stored credentials for GIT
After this it worked from terminal as well as the UI (Git ext)
bugConfirmed bugs or reports that are very likely to be bugspriority-2Bug that affects more than a few users in a meaningful way but doesn't prevent core functions
Activity
shiftkey commentedon Jul 27, 2017
@erikmartinessanches thanks for the detailed report (and public repository that demonstrates the issue):
I think this is due to the submodules using SSH remotes (there's a slightly different flow here, which I can write more about after ☕).
As these submodules are public, they can be changed over to HTTPS URLs which will not trigger the authentication steps. Just remember to synchronize the submodules on your machine after the change:
shiftkey commentedon Jul 27, 2017
Reproducible on macOS:
It looks like our setup for prompting for credentials falls through to some random defaults when it encounters an SSH remote. Not sure if we need to opt in
SSH_ASKPASSas per these docs or something else.shiftkey commentedon Aug 27, 2017
@erikmartinessanches apologies for the delay in replying.
As a workaround you could change these entries to be HTTPS URLs, which will bypass the need to invoke SSH for cloning the submodules which seems to have issues unless you have configured SSH credentials.
ievgennaida commentedon Aug 8, 2018
I have the same issue with https and sub-module. Terminal works fine.
Sub-module is fetched with something like this: [email protected]:www/www.git
fix submodule url
varunsinghal65 commentedon Oct 24, 2018
Hello @erikmartinessanches,
I faced the exact same issue, for me even terminal was not working.
This was after my repo was configured to target HTTPS url and not SSH.
As i workaround i deleted the stored credentials (windows) :
Credentials Manager -> Manage windows credentials -> delete all stored credentials for GIT
After this it worked from terminal as well as the UI (Git ext)
fluffy commentedon Aug 30, 2021
Having exactly this issue. Hard to believe this has been open since 2017.
sergiou87 commentedon Jul 11, 2022
This seems related to the lack of proper support for SSH authentication in GitHub Desktop, but that should've been solved with #12756 and #14677
I just tested it and works as expected with private SSH and HTTPS submodules.
JosephTLyons commentedon Feb 25, 2024
This is happening to me right now.