I've encountered a strange issue, and searched for a long time with no solution.
I have a main project named lapp-yhkt
(local path: /g/webstorm/lapp-yhkt
):
and the content of .gitmodules
:
At this directory, I take the steps from Git-Tools-Submodules:
First init submodule,
$ git submodule init
Submodule 'app/base' (https://git.mobcb.com/liteapp/lapp-base.git) registered for path 'app/base'
the update it and get fatal error,
$ git submodule update
Cloning into 'G:/webstorm/lapp-yhkt/app/base'...
bash: /dev/tty: No such device or address
error: failed to execute prompt script (exit code 1)
fatal: could not read Username for 'https://git.mobcb.com': Invalid argument
fatal: clone of 'https://git.mobcb.com/liteapp/lapp-base.git' into submodule path 'G:/webstorm/lapp-yhkt/app/base' failed
After these, I also tried git submodule sync
and git submodule update
:
$ git submodule sync
Synchronizing submodule url for 'app/base'
$ git submodule update
Cloning into 'G:/webstorm/lapp-yhkt/app/base'...
bash: /dev/tty: No such device or address
error: failed to execute prompt script (exit code 1)
fatal: could not read Username for 'https://git.mobcb.com': Invalid argument
fatal: clone of 'https://git.mobcb.com/liteapp/lapp-base.git' into submodule path 'G:/webstorm/lapp-yhkt/app/base' failed
But same error occur to me, it's frustrated. Hope anyone can save me and thanks in advance.
EDIT: I used git in windows.
Solution :
This problem occurrs when one cloned using HTTPS URL and then tried to push the changes using Git Bash on Windows using:
git clone https://github.com/{username}/{repo}.git
However, when one used SSH URL to clone, this problem doesn't occur:
git clone [email protected]:{username}/{repo}.git
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