在远程计算机上运行批处理文件以更新git分支

时间:2015-03-11 12:53:00

标签: windows git batch-file psexec

我写了这个剧本:

ECHO hi
cd "C:\config_folder"
"C:\Program Files (x86)\Git\bin\git" pull origin master
ECHO bye

我把这个脚本放在我的远程服务器上这个文件夹“C:\ config_folder”。

现在,当我使用此工具从本地PC运行此脚本时:

https://technet.microsoft.com/pl-PL/sysinternals/bb897553.aspx

C:\Users\ME\Desktop\PSTools>psexec.exe -u Administrator -p 123456 \\x.x.x.x "C:\config_folder\test.bat"

我在屏幕上看到以下内容,脚本在无限循环中卡在这个git pull命令上......不知道为什么......我错过了什么?


C:\Windows\system32>ECHO hi
hi

C:\Windows\system32>cd "C:\config_folder"

C:\config_folder>"C:\Program Files (x86)\Git\bin\git" pull origin master

1 个答案:

答案 0 :(得分:0)

我修复了它,我需要与我的用户连接到远程服务器,而不是管理员,现在问题已解决。感谢

相关问题