I have a batch file that will open a application git-cmd. When trying to clone a git repository, i'm getting prompt to enter password on the git-cmd. I want to do it all from the batch file. Is there a command from the batch file that will enter the password automatically to the gmd-cmd and not the windows cmd?
Here's my git connection on git-cmd: git clone username@git.hostname.com/file.git
If you are using https to clone your repository you can put your username and password in URL like this:
git clone https://username:password@git.hostname.com/file.git
However this is a security issue as you expose your password, so be careful.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.