Run a batch file on a remote computer to update a git branch

試著忘記壹切 提交于 2019-12-24 15:26:20

问题


I wrote this script:

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

I put this script on my remote server in this folder "C:\config_folder".

Now when i run this script from my local PC using this tool:

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"

i get the following on my screen, the script is stuck on this git pull command in an infinite loop...no idea why...what did i miss?


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:


i fixed it, i needed to connect to the remote server with my user, not Admin, now the issue is solved. Thanks



来源:https://stackoverflow.com/questions/28987122/run-a-batch-file-on-a-remote-computer-to-update-a-git-branch

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!