It shouldn’t say bash, it should say /run/current-system/sw/bin/bash or another absolute path.
You might also want to try git clone --verbose --progress …
Last but not least, never check environment variables using echo $var use printenv var instead! Shouldn’t make much of a difference here though.
In general I assume though, that the SHELL variable is not an issue here. After re-reading, I am wondering, does this happen for all repos or just some? If the latter, which? Do you use HTTPS or SSH? Have you tried another protocol?
edit:
I just ran the following, by default git clone doesn’t seem to do anything bash/shell/PATH related… (I added zsh just in case it picks my default shell by accident by other means)
I tried cloning the HTTPS URL a minute ago and it failed to authenticate.
I did, however, receive the prompts I expected.
So it might be SSH failing? Can you use that key to connect to the server as the git user?
Good guess!!
$ ssh -T git@github.com
Shell "bash" is not executable: No such file or directory
Running strace on that command shows this
access("bash", X_OK) = -1 ENOENT (No such file or directory)
getpid() = 18868
write(2, "Shell \"bash\" is not executable: "..., 59Shell "bash" is not executable: No such file or directory
Really? I added that line years ago and it just this week gave me problems.
I wish I could remember exactly why I did it. Maybe the fetch program looked subpar with the full path, or maybe it wasn’t being set correctly when using another shell (elvish).