简体   繁体   English

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

[英]Run a batch file on a remote computer to update a git branch

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". 我将此脚本放在此文件夹“ C:\\ config_folder”中的远程服务器上。

Now when i run this script from my local PC using this tool: 现在,当我使用此工具从本地PC运行此脚本时:

https://technet.microsoft.com/pl-PL/sysinternals/bb897553.aspx 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? 我在屏幕上看到以下内容,脚本在无限循环中卡在此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

i fixed it, i needed to connect to the remote server with my user, not Admin, now the issue is solved. 我修复了它,我需要用我的用户而不是Admin连接到远程服务器,现在问题已解决。 Thanks 谢谢

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM