0

I want to make a bat file which runs a git pull command. I have the following .bat file:

ssh.cmd
cd [path to my putty installation]
Start putty.exe -ssh [path to server] -l [username] -pw [password] -m C:[path to text file]/update.txt

and a txt file with the following code

cd [to domain where i want gitt pull to be executed]
git pull https://[username]@bitbucket.org/[username]/[project].git

This works, but putty asks for a password for the git. however, i cant put it in. How do i pass the git password with the command? or make the password input on putty work?

Robert Baelde
  • 105
  • 1
  • 9

1 Answers1

0

You can use credential helper, which will cache credentials after you will enter it for the first time. For more details see this answer

Community
  • 1
  • 1
potato
  • 471
  • 2
  • 13