在远程计算机上运行一个批处理文件来更新一个Git分支 [英] Run a batch file on a remote computer to update a git branch

查看:272
本文介绍了在远程计算机上运行一个批处理文件来更新一个Git分支的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我写这个剧本:

  ECHO喜
CDC:\\ config_folder
C:\\ Program Files文件(x86)的\\ Git的\\ BIN \\混帐拉主产地
ECHO再见

我把这个剧本我的远程服务器上的这个文件夹C:\\ config_folder。

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

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

  C:\\用户\\ ME \\桌面\\ PSTools> psexec.exe -u -p管理员\\\\ 123456 X.X.X.XC:\\ config_folder \\ test.bat的

我得到以下我的屏幕上,该脚本是停留在这个混帐拉命令在一个无限循环......不知道为什么......我错过了什么?


  C:\\ Windows \\ System32下> ECHO喜
嗨C:\\ Windows \\ System32下> CDC:\\ config_folderC:\\ config_folder>C:\\ Program Files文件(x86)的\\ Git的\\ BIN \\混帐拉主产地



解决方案

我固定它,我需要用我的用户,而不是管理员,现在问题解决连接到远程服务器。谢谢

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


解决方案

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

这篇关于在远程计算机上运行一个批处理文件来更新一个Git分支的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆