我想创建一个运行git pull命令的bat文件。我有以下.bat文件:
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
和一个包含以下代码的txt文件
cd [to domain where i want gitt pull to be executed]
git pull https://[username]@bitbucket.org/[username]/[project].git
这是可行的,但是putty要求输入git的密码。但是,我不能把它放进去。如何通过命令传递git密码?或者让putty上的密码输入起作用?
发布于 2014-06-12 19:17:20
您可以使用credential helper,它会在您首次输入凭据后对其进行缓存。有关详细信息,请参阅this answer
https://stackoverflow.com/questions/24182505
复制相似问题